½Ð°Ý¦p¦ó¥ÎÁä½LÁä¸òCommandButton¦³¬Û¦P¥\¯à
- ©«¤l
- 185
- ¥DÃD
- 46
- ºëµØ
- 0
- ¿n¤À
- 227
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN 7
- ³nÅ骩¥»
- ºX舰ª©
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-9-14
- ³Ì«áµn¿ý
- 2024-10-25
|
½Ð°Ý¦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¦¨ªº?ÁÂÁÂ! |
|
|
|
|
|
|
- ©«¤l
- 185
- ¥DÃD
- 46
- ºëµØ
- 0
- ¿n¤À
- 227
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN 7
- ³nÅ骩¥»
- ºX舰ª©
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-9-14
- ³Ì«áµn¿ý
- 2024-10-25
|
Public i As Integer
Private Sub CommandButton1_Click()
Application.OnKey "{F1}"
i = i + 1
Sheets("sheet1").Cells(i, 1) = "X="
Sheets("sheet1").Cells(i, 2) = Int((10 * Rnd) + 1)
End Sub
¸Õ¤F³oÓ¡A¦ý¤£¦¨¥\... |
|
|
|
|
|
|
- ©«¤l
- 185
- ¥DÃD
- 46
- ºëµØ
- 0
- ¿n¤À
- 227
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN 7
- ³nÅ骩¥»
- ºX舰ª©
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-9-14
- ³Ì«áµn¿ý
- 2024-10-25
|
Private Sub CommandButton1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
§ä¨ì³oÓ¡A¦ý¤£À´¦³¨S¦³Ãö«Y... |
|
|
|
|
|
|
- ©«¤l
- 185
- ¥DÃD
- 46
- ºëµØ
- 0
- ¿n¤À
- 227
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN 7
- ³nÅ骩¥»
- ºX舰ª©
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-9-14
- ³Ì«áµn¿ý
- 2024-10-25
|
Public i As Integer
Private Sub CommandButton1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
If KeyAscii = Asc("{F1}") Then
CommandButton1_Click
End If
End Sub
Private Sub CommandButton1_Click()
i = i + 1
Sheets("sheet1").Cells(i, 1) = "X="
Sheets("sheet1").Cells(i, 2) = Int((10 * Rnd) + 1)
End Sub
¸Õ¤F³oÓ¡A¤]¤£¦¨¥\... |
|
|
|
|
|
|
- ©«¤l
- 185
- ¥DÃD
- 46
- ºëµØ
- 0
- ¿n¤À
- 227
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN 7
- ³nÅ骩¥»
- ºX舰ª©
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-9-14
- ³Ì«áµn¿ý
- 2024-10-25
|
¦^´_ 5# GBKEE
Public i As Integer
Sub Ex()
Application.OnKey "{F1}", "Sheet1.CommandButton1_Click"
End Sub
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!¦ýÁÙ¬O¤£¦¨...¤p½úÁÙ¦³¤°»ò¿ù? |
|
|
|
|
|
|
- ©«¤l
- 128
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 118
- ÂI¦W
- 0
- §@·~¨t²Î
- WinXP
- ³nÅ骩¥»
- Office2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥|¤t¦¨³£ÊT崃
- µù¥U®É¶¡
- 2010-9-13
- ³Ì«áµn¿ý
- 2017-5-12
|
³on¥Î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 |
|
|
|
|
|
|
- ©«¤l
- 185
- ¥DÃD
- 46
- ºëµØ
- 0
- ¿n¤À
- 227
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN 7
- ³nÅ骩¥»
- ºX舰ª©
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-9-14
- ³Ì«áµn¿ý
- 2024-10-25
|
¦^´_ cdkee
Sub Ex()
Application.OnKey "{F1}", "Sheet1.CommandButton1_Click"
End Sub
Private ...
GBKEE µoªí©ó 2010-10-6 21:15
Sheet1¬O¨p¥Îµ{§Ç¡Anק墨¨Ç?ÁÂÁª©¤j!
³on¥Î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¤£¦æ? |
|
|
|
|
|
|
- ©«¤l
- 185
- ¥DÃD
- 46
- ºëµØ
- 0
- ¿n¤À
- 227
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN 7
- ³nÅ骩¥»
- ºX舰ª©
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-9-14
- ³Ì«áµn¿ý
- 2024-10-25
|
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·|°µ¨ì? |
|
|
|
|
|
|