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

¹Ï®×«ü©w¥¨¶°

¹Ï®×«ü©w¥¨¶°

´¡¤J¤@­Ó¹Ï®×«á¡A¥i¥H«ü©w¥¦ªº°õ¦æ¥¨¶°¡A¦ý¦n¹³¥u¯à«ü©w Module ¸Ìªº Sub
¦pªG§Ú­n«ü©w¤u§@ªí¤¤ªº Private Sub °µ¬°¹Ï®×ªº¥¨¶°¡A¤£ª¾¸Ó¦p¦ó«ü©w?
¨Ò¦p
Private Sub CommandButton1_Click()
Columns("G:J").EntireColumn.Hidden = False
OptionButton1 = False
OptionButton2 = False
OptionButton3 = False
Module1.test
End Sub
§Ú·Q¥Î¤@­Ó¹Ï®×¡A§â CommandButton1 ´À´«±¼¡A³o­Ó¹Ï®×ªº¥¨¶°¸Ó¦p¦ó«ü©w?
Jess

¥»©«³Ì«á¥Ñ GBKEE ©ó 2011-11-17 22:01 ½s¿è

¦^´_ 1# jesscc
OnAction : «ü©w¥¨¶°
¤@¯ëModule ¼Ò²Õ¤¤¸Ìªº Sub  ¤£¥²«ü©ú Module(¼Ò²Õ)  ¦ý Private   »Pª«¥ó¼Ò²Õ¤¤ ªºµ{§Ç,  ¬Ò»Ý«ü©ú

Sub Ex()
    Sheet1.Shapes(1).OnAction = "Sheet1.CommandButton1_Click"
End Sub

TOP

¥»©«³Ì«á¥Ñ jesscc ©ó 2011-11-17 22:08 ½s¿è

ÁÂÁÂG¤j!
³o­Ó¹Ï®×ªº¦WºÙ¥s "¶ê¨¤¯x§Î1"¡AÀ³¸ÓµL©Ò¿×§a!¥¦­Ì³£¬OÄÝ©ó Shapes §a?
¦pªG¦³«Ü¦hShapes
Sub Ex()
    Sheet1.Shapes(1).OnAction = "Sheet1.CommandButton1_Click"
    Sheet1.Shapes(2).OnAction = "Sheet1.CommandButton2_Click"
    Sheet2.Shapes(3).OnAction = "Sheet2.CommandButton3_Click"
End Sub
§â©Ò¦³ªºShapes³£«ü©w¨ìEx³o­Ó¥¨¶°
¥i¥H³o¼Ë¼g¶Ü?
Jess

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2011-11-18 07:27 ½s¿è

¦^´_ 3# jesscc
¬Oªº
  1. Sub Ex()
  2.     Dim i As Integer
  3.     With Sheet1
  4.         For i = 1 To .Shapes.Count
  5.             .Shapes(i).OnAction = .Name & ".CommandButton" & i & "_Click""
  6.         Next
  7.     End With
  8. End Sub
½Æ»s¥N½X

TOP

¦^´_ 4# GBKEE


    ÁÂÁÂG¤j¡AÁÙ¦³¤@­Ó¤pºÃ°Ý¡C³o¨Ç Shapes ªºÄݩʦWºÙ¦n¹³¥u¦³¦b«ü©w¥¨¶°ªº®É­Ô¤~¬Ýªº¨ì¡A¥­±`¦pªG­n§ï¦WºÙ¤£ª¾±q¦ó³B§ï?
¨Ò¦p¡A§Ú­n§â¦WºÙ"¶ê¨¤¯x§Î1"§ï¦¨"³sµ²1"
Jess

TOP

¿ï¤¤Shapes¡A¥ª¤W¨¤ªº¦WºÙ¤è¶ô¤º¿é¤J·sªº¦WºÙ¡C

TOP

¦^´_ 5# jesscc

TOP

­ü!§Ú¯u¬O¤j²´·ú¡C
ÁÂÁÂO¤j©MG¤j!
Jess

TOP

        ÀR«ä¦Û¦b : ¦a¤WºØ¤Fµæ¡A´N¤£©öªø¯ó¡F¤ß¤¤¦³µ½¡A´N¤£©ö¥Í´c¡C
ªð¦^¦Cªí ¤W¤@¥DÃD