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

[µo°Ý] ¦¹¥¨¶°¬°¦ó¿ù??

p.s. (65536 µLªk©ñ¦bVbMsgBoxSetForeground «á­±¡A»yªk¿ù»~)

TOP

p.s. (65536 µLªk©ñ¦bVbMsgBoxSetForeground «á­±¡A»yªk¿ù»~)
t8899 µoªí©ó 2013-8-27 06:14

65536 ©ñ¦b VbMsgBoxSetForeground «á­±?
·íµM·|µo¥Í¿ù»~°Õ.

»¡©ú¤¤ªº¤º¤å¬O :

             ±`¼Æ                       ­È                       »¡©ú
====================================================
VbMsgBoxSetForeground      65536     «ü©w°T®§¤è¶ôµøµ¡§@¬°«e´ºµøµ¡¡C

¥¦ªº·N«ä¬O»¡ :
¦b Excel VBA ¤¤, ¤w¸g¦³©w¸q¤F VbMsgBoxSetForeground ³o­Ó±`¼Æªº­È¬° 65536,
§A¦b MsgBox ¨ç¼Æªº buttons ¤Þ¼Æªº¦ì¸m¤W,
¥i¥H¨Ï¥Î VbMsgBoxSetForeground ³o­Ó±`¼Æ ©Î¬O¥Î 65536 ³o­Ó­È(¥ô¨ú¨ä¤¤¤§¤@),
¨Ó³]©w³o¦¸¨Ï¥Î MsgBox ¨ç¼Æ «ü©w¨ä °T®§¤è¶ôµøµ¡ §@¬°«e´ºµøµ¡.

§A¤]¥i¥H°Ñ¦Ò MsgBox ªº½d¨Ò±oª¾¨ä¨Ï¥Î¤è¦¡:
Style = vbYesNo + vbCritical + vbDefaultButton2    ' ©w¸q«ö¶s¡C
Response = MsgBox(Msg, Style, Title, Help, Ctxt)
°Ñ·Ó½d¨Ò¥i±o¥X§A¥i¥H¨Ï¥Î :
MsgBox sStr, vbYesNo + VbMsgBoxSetForeground , "´£¥Ü°T®§"
©Î¬O
MsgBox sStr, 4 + 65536 , "´£¥Ü°T®§" (¥ª¦¡¤]µ¥¦P MsgBox sStr, 65540 , "´£¥Ü°T®§")
¤W¨â¦¡ªºµ²ªG¬O¬Û¦Pªº.

¤£¹L MsgBox ¨ç¼Æ¥i¥H¨Ï¥Îªº±`¼Æ¤£¤@©w´N¾A¥Î MsgBoxTest (¦b Windows API ¤¤¥¦¨ä¹êÀ³¸Ó¬O MessageBoxTimeoutA),
³o­n¬Ý¦b Windows API »P Excel VBA ¤¤,
MessageBoxTimeoutA ¨ç¼Æ¬O§_¦³¹ê°µ¥X¸Ó¤Þ¼Æ¬° VbMsgBoxSetForeground ­È®É©ÒÀ³¸Ó¥X²{ªº®ÄªG,
³Ì²³æªº¤èªk´N¬O®M¥Î¶iµ{¦¡¤¤,
µM«á¹ê»Ú¶]¶]¬Ý´Nª¾¹D¦³¨S¦³¦¹¥\¯à¤F.

TOP

65536 ©ñ¦b VbMsgBoxSetForeground «á­±?
·íµM·|µo¥Í¿ù»~°Õ.
»¡©ú¤¤ªº¤º¤å¬O :
         ±`¼Æ ...
luhpro µoªí©ó 2013-8-27 22:56

Sub eighty()
   Sheets("Sheet1").Select
    Range("a65536").End(xlUp).Offset(1).Select
        Application.SendKeys "{Home}", True
        Application.SendKeys "^{;}", True
        Application.SendKeys "{enter}", True
Sheets("Sheet1").Select
Range("B2:N2").Select   '=====>¬°¦ó¦h¥[¦¹¦æ¡A³y¦¨¤W­±ªº°õ¦æ¤£¥¿½T,®³±¼«h¥¿½T???? 0test.rar (7.14 KB)

   End Sub

TOP

¦^´_ 63# t8899
  1. Sub eighty()
  2.     With Sheets("Sheet1")
  3.         .Select
  4.         .Range("a65536").End(xlUp).Offset(1).Select
  5.         Application.SendKeys "{Home}", True
  6.         Application.SendKeys "^{;}", True
  7.         Application.SendKeys "{enter}", True
  8.         .Range("B2:N2").Select
  9.     End With
  10. End Sub
½Æ»s¥N½X
¸Õ¸Õ¬Ý¡I

TOP

¦^´_  t8899 ¸Õ¸Õ¬Ý¡I
c_c_lai µoªí©ó 2013-8-28 07:28


µL®Ä..................

TOP

¦^´_ 65# t8899
  1. Sub eighty()
  2.     With Sheets("Sheet1")
  3.         .Select
  4.         .Range("a65536").End(xlUp).Offset(1).Select
  5.         Application.SendKeys "{Home}", True
  6.         Application.SendKeys "^{;}", True
  7.         Application.SendKeys "{enter}", True
  8.         DoEvents
  9.         .Range("B2:N2").Select
  10.     End With
  11. End Sub
½Æ»s¥N½X

TOP

¦^´_  t8899
stillfish00 µoªí©ó 2013-8-29 13:53


³o­Ó¥i¥H¡A¥i¯à°õ¦æ³t«×¤Ó§ÖªºÃö«Y??

TOP

Sub eighty()
         ...
Range("B2:N2").Select   '=====>¬°¦ó¦h¥[¦¹¦æ¡A³y¦¨¤W­±ªº°õ¦æ¤£¥¿½T,®³±¼«h¥¿½T????
t8899 µoªí©ó 2013-8-28 06:49

³o¦æ¬O§Ú¥[ªº¶Ü?
§Ú¨S¦³¦L¶H¦³¥[³o¦æ°Ú?

²{¦b§Ú¤w¸g«Ü¤Ö¥Î Select «ü¥O¤F,
°£«D½T¦³¨ä¥²­n©Ê,(¨Ò¦p»Ý­n¥Î¨ì Selection °µ«ü¥O¥DÅé, ©Î¬O»Ý­nÅܧóExcelÀÉ®×µJÂI¨ì¥t¤@­Ó¥DÅé¤W)
§_«h³o¦æ°£¤F®ö¶O¨t²Î¸ê·½¥~,
¨Ã¨S¦³¤°»ò¨ä¥L¦n³B,
«Ü¦h±¡§Î¤U¨ä¹ê¬O®Ú¥»¤£»Ý¥Î¨ì Select «ü¥O´N¥i¥H¹F¨ì§Ú­Ìªº¥Øªº.

¤£¹L³o­Ó«ü¥O¦b Debug µ{¦¡®É­Ë¬Oº¡¦n¥Îªº,
¨Ò¦p·Q Copy ®É,
¥i¥H¥ý¤£¯uªº Copy ¦Ó¥i¥H¨Ï¥Î F8  ³æ¨B¼Ò¦¡°lÂÜ,
°õ¦æ Copy «e¥ý¦b§Y®Éµøµ¡¥Î Select ¨Ó½T»{±ý¹B§@ªº¼Ðªº¬O§_¥¿½T.

¦]¬°§Aªº Sample Àɤ£¯à§PÂ_¸Ó¦æ¥Î³B¦b­þ¤Î®³±¼¬O§_·|¥X°ÝÃD,
©Ò¥H§A¥u¯à¦Û¦æ´ú¸Õ©Î§PÂ_,
§A­Y¬O½T©w¥[¤F¸Ó«ü¥O¹ïµ{¦¡µ²ªG¨S¤°»ò¥Î³Bªº¸Ü,
¨º´N°®¯Üª½±µ§R±¼¸Ó¦æ§a. (§A¤]¥i¥H¥ý¦b¸Ó¦æ«e­±¥[­Ó  '   §â¥¦Åܦ¨µù¸Ñ¤å¦r, ¸Ó¦æ´N¤£·|°õ¦æ¤F, ¤Ï¤§´N¤S·|°õ¦æ¤F)

TOP

³o¦æ¬O§Ú¥[ªº¶Ü?
§Ú¨S¦³¦L¶H¦³¥[³o¦æ°Ú?

luhpro µoªí©ó 2013-8-29 23:23

©êºp¡A³o¬O§Ú¥t¥~°Ýªº.....¤£¬O§A¥[ªº
µª®× ¥i¥Î DoEvents ¸Ñ¨M (¥i¯àcpu ¶]¤Ó§Ö¤F)

TOP

        ÀR«ä¦Û¦b : ¤H¥Í³Ì¤jªº¦¨´N¬O±q¥¢±Ñ¤¤¯¸°_¨Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD