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

Ãö©óVBA¼g¦b¤u§@ªí1©MModule1¤ºªº¼gªk¤£¦Pªº¦a¤è¬O?(5/2¡AH¤j¤w¸Ñ¨M)

Ãö©óVBA¼g¦b¤u§@ªí1©MModule1¤ºªº¼gªk¤£¦Pªº¦a¤è¬O?(5/2¡AH¤j¤w¸Ñ¨M)

¥»©«³Ì«á¥Ñ av8d ©ó 2012-5-2 16:01 ½s¿è

¥Ø«e¥X²{¤@­Ó°ÝÃD~
¤u§@ªí1¥´¤JCommandButton1_Click
¥H¤W°õ¦æ¨S°ÝÃD

¨ì¤FModule1¤º¥´¤JCommandButton1_Click
·|¸õ¥X¿ù»~°T®§µøµ¡  ¨S¦³©w¸q³o­ÓSub©ÎFunction

¦^´_ 1# av8d
·|¸õ¥X¿ù»~°T®§µøµ¡  ¨S¦³©w¸q³o­ÓSub©ÎFunction
¥´¤J  SUB CommandButton1_Click    ²¾°Ê·Æ¹««á ¦Û°Ê¥Í¦¨
Sub CommandButton1_Click()           ' µ{¦¡µ{§Ç
End Sub

¥´¤J  Function CommandButton1_Click    ²¾°Ê·Æ¹««á ¦Û°Ê¥Í¦¨
Function CommandButton1_Click()    '¨ç¼Æ µ{§Ç
End Sub

TOP

¦^´_ 2# GBKEE


    G¤j~¦­¦w~¦A¦¸·PÁÂ~

¥i¬O§Ú¼g¤U¥hªº¥¨¶°¬O³]©w§Ö±¶Áä~µM«á¥h°õ¦æ

¤]´N¬O»¡§Ú§â¥¦½Õ¾ã¦¨Áä½L«ö¤UF1¦n¤F~¥L·|À°§ÚÂI¨º­Ó«ö¶s@@

TOP

¦^´_ 3# av8d
Áä½Lªº F1 ¬O»¡©úÁä  ½Ð¦A»¡²M·¡¨Ç

TOP

¦^´_ 1# av8d

¤u§@ªí«ö¶s¨Æ¥óµ{§Ç¡A¦]¬°CommandButton1¬O±MÄÝ©ó¸Ó¤u§@ªíª«¥ó
©Ò¥H¦b³]­p¼Ò¦¡¤UÂùÀ»¸Ó«ö¶s·|¦Û°Ê¦b¤u§@ªí¼Ò²Õ·s¼W
Private Sub CommandButton1_Click()µ{§Ç
³o¬OÄÝ©ó¨p¦³µ{§Ç¡A¥u¦³¦b¸Ó¤u§@ªí½d³ò¤º§@¥Î
¦Ó¥i¥H³]¸m§Ö³tÁ䪺µ{§Ç¬O¦b¤@¯ë¼Ò²Õ¤º
­n¥Ñ¤@¯ë¼Ò²Õ¤ºªºµ{§Ç¨Ó±Ò°Ê¤u§@ªí¼Ò²Õ¤ºªºµ{§Ç
¥²¶·³z¹LRun ¤èªk
¨Ò¦p:
Sheet1¼Ò²Õ
  1. Private Sub CommandButton1_Click()
  2. MsgBox "Sheet1!CommandButton1_Click"
  3. End Sub
½Æ»s¥N½X
Module1¼Ò²Õ
Ex³]§Ö³tÁäctrl+n
  1. Sub Ex()
  2. MsgBox "Sheet1.CommandButton1_Click±N³QIJµo"
  3. Run "Sheet1.CommandButton1_Click"
  4. End Sub
½Æ»s¥N½X
·í«ö¤UÁä½Lctrl+n´N·|¥ý¥X²{¹ï¸Ü°T®§
"Sheet1.CommandButton1_Click±N³QIJµo"
µM«áIJµoSheet1.CommandButton1_Clickµ{§Ç
¥X²{¹ï¸Ü°T®§
"Sheet1!CommandButton1_Click"
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 5# Hsieh


    ¼Ò²Õ³]©w«á¡A°õ¦æ ¥X²{

°õ¦æ¶¥¬q¿ù»~'1004'
µLªk°õ¦æ¦¹¥¨¶°


§Ú«ö¤U¤F»¡©ú~Excel 2010 ¶}µo¤H­û°Ñ¦Ò »¡©ú¤Î¨Ï¥Î¤èªk~¦ý¬O¤£ª¾¹D­n«ö­þ¤@­Ó¶i¥h¬Ý»¡©ú!

TOP

¦^´_ 6# av8d
2010ªº¤u§@ªíCodeName¬O¤¤¤å¦r"¤u§@ªí1"
  1. Private Sub CommandButton1_Click()
  2. MsgBox "¤u§@ªí1!CommandButton1_Click"
  3. End Sub
½Æ»s¥N½X
  1. Sub Ex()
  2. MsgBox "¤u§@ªí1.CommandButton1_Click±N³QIJµo"
  3. Run "¤u§@ªí1.CommandButton1_Click"
  4. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

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