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

½Ð°Ý¦p¦ó¥ÎÁä½LÁä¸òCommandButton¦³¬Û¦P¥\¯à

½Ð°Ý¦p¦ó¥ÎÁä½LÁä¸òCommandButton¦³¬Û¦P¥\¯à

¥»©«³Ì«á¥Ñ cdkee ©ó 2010-10-6 18:00 ½s¿è

Public i As Integer

Private Sub CommandButton1_Click()

i = i + 1
        Sheets("sheet1").Cells(i, 1) = "X="
        Sheets("sheet1").Cells(i, 2) = Int((10 * Rnd) + 1)

End Sub

½Ð±Ð¤j¤j¡A«öÁä½LÁä(¨Ò¦p"F1")¸ò«öCommandButton1¦³¬Û¦P¥\¯à¡A¬O«ç¼Ë¼g¦¨ªº?ÁÂÁÂ!

¦^´_ 14# GBKEE


    ÁÂÁª©¤j¦h¤è´£ÂI!

TOP

¦^´_ 13# cdkee
­n¹F¨ì¤@­Óµ²ªGªºµ{¦¡½X ¼gªk¤£¤@©w³£¬O¤@¼Ëªº ¦Û¤v°ª¿³´N¦n

TOP

et5323¬O»¡¤Ö¥ÎAPI¨ç¼Æ
½Ð¬ÝªþÀÉ
GBKEE µoªí©ó 2010-10-7 07:27



    ¸òª©¤jªº¤èªk¦¨¥\¤F¡A¦ý¤p½ú¤´¦b«ä¦Ò...³o¤è¦¡¦³¤°»ò¤£¦n?¤j¤j­Ì¦n¹³¤£¤j«Øij¡A¬O¤p½ú¤p¨£¡A¦A½Ð¤j¤j­Ì±Ð¾É¡C

TOP

et5323¬O»¡¤Ö¥ÎAPI¨ç¼Æ
½Ð¬ÝªþÀÉ
GBKEE µoªí©ó 2010-10-7 07:27



    ÁÂÁª©¤j!¥ý¤UÛ´¨Ó¾Ç²ß...

TOP

Sheet1¬O¨p¥Îµ{§Ç¡A­n­×§ï¨º¨Ç?ÁÂÁª©¤j!
¤j¤j¬O»¡¨S¦³API´N¤£¦æ?
cdkee µoªí©ó 2010-10-6 22:21

et5323¬O»¡¤Ö¥ÎAPI¨ç¼Æ
½Ð¬ÝªþÀÉ


OnKey.rar (37.07 KB)

TOP

1. In design mode, select your CommandButton1;
2. In the Properties window, enter a single letter for the field Accelerator;

Suppose the caption of your CommandButton1 is ¡§Fire¡¨ and a letter ¡§r¡¨ is typed in step 2, then letter ¡§r¡¨ will be underlined.
Other letters will be accepted but the underline will not shown in the caption.
Also note that it is different for lower and upper case letters.

To run your subroutine, press ALT+r or click CommandButton1 for the above example.
§ä¨ì¹³¼Ëªº¡A¦ý­n«ö2­ÓKEY¡A¤ÎFUNCTION KEY¤£¯à§Q¥Î!
½Ð±Ð¤j¤j«ç¼Ë§ï¡A¤]¥i·|°µ¨ì?

TOP

¦^´_  cdkee
Sub Ex()
Application.OnKey "{F1}", "Sheet1.CommandButton1_Click"
End Sub

Private  ...
GBKEE µoªí©ó 2010-10-6 21:15



    Sheet1¬O¨p¥Îµ{§Ç¡A­n­×§ï¨º¨Ç?ÁÂÁª©¤j!
³o­n¥ÎAPIªºHook(¹_¤l¨ç¼Æ)¨ÓºÊµø§AªºÁä½L¾Þ§@¡A¤ñ¸û³Â·Ð¡A«Ü¦h¤ì°¨´N¨Ï¥Î¤F³o­Ó§Þ³N¨Ó±o¨ì§A¿é¤Jªº±K½X¡B±b ...
et5323 µoªí©ó 2010-10-6 21:26

¤j¤j¬O»¡¨S¦³API´N¤£¦æ?

TOP

³o­n¥ÎAPIªºHook(¹_¤l¨ç¼Æ)¨ÓºÊµø§AªºÁä½L¾Þ§@¡A¤ñ¸û³Â·Ð¡A«Ü¦h¤ì°¨´N¨Ï¥Î¤F³o­Ó§Þ³N¨Ó±o¨ì§A¿é¤Jªº±K½X¡B±b¸¹µ¥¸ê°T¡C
§A¦b¿ý»s¥¨¶°®É¡A·|¤¹³\§A³]¸m¤@­Ó¡§§Ö±¶Á䡨¡A³q¹L³o­Ó§Ö±¶Áä¨Ó¹B¦æ§»¥N½X¡A¤]¥i¥H±o¨ì¦P¼Ëªº¥Øªº¡C

TOP

¦^´_ 6# cdkee
Sub Ex()
Application.OnKey "{F1}", "Sheet1.CommandButton1_Click"
End Sub

Private Sub CommandButton1_Click()  -> ¬OSheet1 ªº¨p¥Îµ{§Ç¶Ü?  <- Sheet1 ­n­×§ï¶Ü?

TOP

        ÀR«ä¦Û¦b : §g¤l¬°¥Ø¼Ð¡A¤p¤H¬°¥Øªº¡C
ªð¦^¦Cªí ¤W¤@¥DÃD