ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

±j¨î msgbox ¥X²{¦b«e´ºµøµ¡ ?

±j¨î msgbox ¥X²{¦b«e´ºµøµ¡ ?

³Ìªñ¹J¨ì­Ó°ÝÃD¬OVBAµ{¦¡°õ¦æ¤¤¡A¦pªG¤Á´«¨ì¨ä¥L«DExcelµøµ¡(¦pPowerPoint¡BNotepad)¡A¼u¥Xªº msgbox °T®§´N¤£·|¥X²{¦b«e´º¡AExcel ³o®É·|°{Ã{¡A°£«D§A¦AÂI¤@¦¸ Excel §Aªº°T®§µøµ¡¤~·|¥X²{¡C

¦³¨S¦³¿ìªk±j¨î¥¦¥X²{¤£¥Î¦AÂI¤@¦¸ Excel ©O? §Ú´ú¸Õ¤F vbMsgBoxSetForeground ©M vbSystemModal ¦n¹³³£¨S®Ä?

Sub Test()
    Application.Wait Now + TimeValue("00:00:05")    'µ¥¤­¬í¡A¦¹®É§A¤â°Ê¤Á´«¨ì¨ä¥L³nÅéµøµ¡
    MsgBox "Finish!", vbMsgBoxSetForeground + vbSystemModal
End Sub

¦^´_ 2# stillfish00


    ³Ìªñ¦b´M§ä¦¹¤èªk,¨S·Q¨ìS¤j©~µM¤]¦³¬Û¦P°ÝÃD,¨Ã¥B¸Ñ¨M¤F
¤p§ÌµLªk¥ÎAppActivate Application
¦ý¥i¥H¥ÎAppActivate Application.Caption
¯u¬O¤Ó·P¿E¤F

·Q¶¶«K¦A¸ß°Ý©µ¦ù°ÝÃD
¦³¿ìªk¦Û°ÊÃö³¬MSGBOX ¶Ü?
¦]¬°µ{¦¡¥u­n°õ¦æ¨ì¨ºÃä´N·|¦Û°Ê°±¤î¥ô¦ó°Ê§@

¥D­nÀ³¥Î¨ì¬Yºô¯¸¤W­±,ÂI¿ï¤F¤W¶ÇÀɮתº¦ì¸m,´N·|¸õ¥Xµøµ¡½Ð§Ú¿ï¾ÜÀÉ®×
¦ý¸Óµøµ¡¤@¦ý¥X²{´N¸òmsgbox ¤@¼Ë,§¹¥þµLªk°Ê§@
¥BµLªkª½±µ³z¹Lºô­¶¤¸¯À¿é¤J,¦oªºvalue­È¬O:c:\fakepath\XXX
¤¤¶¡ªº­È³£·|Åܦ¨fakepath
¥B§Ú±j­¢±N¦oªºvalue="C:\aaa.txt" ¤]§¹¥þµL¤ÏÀ³
¥u¦³±N¸Óµøµ¡Ãö³¬¤§«á¤~¥i°Ê§@(¸òmsgbox ¬Û¦P)
¦]¬°¸Óºô¯¸¬O·|­ûµn¤J¨î,©Ò¥HµLªk´£¨Ñ
PKKO

TOP

¦^´_ 1# stillfish00
°ÝÃD¤w¸Ñ¨M¡A¦Û¤v¦^µª
«á¨Ó±Ä¥Î¥H¤U¤èªk¡A§Q¥ÎAppActivate ­«·s Focus EXCEL ´N¥i¥H¤F

Sub Test()
    Application.Wait Now + TimeValue("00:00:05")    'µ¥¤­¬í¡A¦¹®É§A¤â°Ê¤Á´«¨ì¨ä¥L³nÅéµøµ¡
    AppActivate Application     '©Î AppActivate Application.Caption
    MsgBox "Finish!"
End Sub

TOP

        ÀR«ä¦Û¦b : ¡i°±º¢¤£«e¡A²×µL©Ò±o¡j¤H³£°g©ó´M§ä©_ÂÝ¡A¦]¦Ó°±º¢¤£«e¡FÁa¨Ï®É¶¡¦A¦h¡B¸ô¦Aªø¡A¤]¤FµL¥Î³B¡A²×µL©Ò±o¡C
ªð¦^¦Cªí ¤W¤@¥DÃD