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

¦p¦ó±oª¾«ö¶s(ªí³æ±±¨î¶µ)ªºObject Name¤Î±±¨î

¦p¦ó±oª¾«ö¶s(ªí³æ±±¨î¶µ)ªºObject Name¤Î±±¨î

½Ð±Ð±z¡G
§Ú¨Ï¥Î¤F   ¶}µo¤H­û->´¡¤J->«ö¶s(ªí³æ±±¨î¶µ) ¡A ¤@­Ó¦W¬°¶}±Ò¶s¡A¥t¤@­Ó¬°Ãö³¬¶s¡C
½Ð±Ð±z¡A·í§Ú·Q­n¦b EXCEL ¶}±Ò®É¡A¶}±Ò¶s¬°ÁôÂÃ(Hide)¼Ò¦¡¡A·í§Ú¿ï«öÃö³¬¶s®É¡A
¶}±Ò¶s´NÅã¥Ü¥X¨Ó(Enable)¡AÃö³¬¶s´N¦P®ÉÅܧó¬°ÁôÂÃ(Hide)¼Ò¦¡¡A¤Ï¤§¥çµM¡C
¦]¬°§Ú¦bVBA½s¿è¾¹¤º¡A¤£ª¾­n¦p¦ó±oª¾³o¨Ç«ö¶sªºObject Name¡A¥H¤Î¯à§_¨Ï¥Î
Enable©ÎDisable»yªk¡A³Ó¦ÜÁÙ·Q±N'¶}±Ò'¦r¥y§ï¬°¨ä¥L¦r»y©ÎÅܧóÃC¦âµ¥µ¥¡A
¦b¦¹ÁÂÁ±z¤F¡I

¥»©«³Ì«á¥Ñ hugh0620 ©ó 2012-3-22 13:34 ½s¿è

¦^´_ 1# c_c_lai

   ¤U¹Ï¬O§A·Q­nªºµ²ªG~
   ³]¨â­Óªí³æ«ö¶s
    [«ö¶s 1]=>open
     [«ö¶s 2]=>close
    ³]¨â­Óµ{¦¡½X¦bsheet1¤¤
  1.     Sub ex1()  'Close=false Open=True
  2. [«ö¶s 1].Visible = True
  3. [«ö¶s 2].Visible = False
  4. End Sub
  5. Sub ex2()  'Open=false Close=True
  6. [«ö¶s 2].Visible = True
  7. [«ö¶s 1].Visible = False
  8. End Sub
½Æ»s¥N½X
³]¤@­Óµ{¦¡½X¦bthisworkbook¤¤
  1. Private Sub Workbook_Open()

  2. [«ö¶s 1].Visible = False

  3. End Sub
½Æ»s¥N½X
[«ö¶s 2]«ü©w¥¨¶°Sheet1.ex1
     [«ö¶s 1]«ü©w¥¨¶°Sheet1.ex2      
ªí³æ«ö¶sªº³]©w.rar (6.79 KB)
ªí³æ«ö¶sªº³]©w.gif
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

¦^´_ 1# c_c_lai

play.gif
¤@¯ë¼Ò²Õ
  1. Sub auto_open()
  2. Dim Sp As Shape
  3. For Each Sp In ¤u§@ªí2.Shapes
  4. Sp.OnAction = "OC"
  5.    If Sp.TextFrame.Characters.Text = "¶}±Ò" Then
  6.       Sp.Visible = msoFalse
  7.       Else
  8.       Sp.Visible = msoTrue
  9.     End If
  10. Next
  11. End Sub
  12. Sub OC()
  13. For Each Sp In ¤u§@ªí2.Shapes
  14.       Sp.Visible = msoTrue
  15. Next
  16. ¤u§@ªí2.Shapes(Application.Caller).Visible = False
  17. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

ÁÂÁª©¥D«ü¾É¡A¤£¹L¦b¦sÀɮɡA«o¥X²{¤F¥H¤U¤§°T®§¡G
­Y­nÀx¦s¨ã¦³³o¨Ç¥\¯àªºÀɮסA½Ð«ö¤@¤U§_¡A¦b©óÀÉ®×Ãþ«¬²M³æ¿ï¾Ü±Ò¥Î»E¶°ªºÀÉ®×Ãþ«¬¡C
­Y­nÄ~ÄòÀx¦s¬°µL¥¨¶°¬¡­¶Ã¯¡A½Ð«ö¤@¤U¬O¡C
¦pªG¿ï¬O¡A¦sÀÉ«á¦A¦¸¶}±Ò¡AVBA³£¤£¨£¤F¡A¿ï§_¥ç¤£¬O¡A½Ð±ÐÀ³¦p¦ó¥¿½T«Ø¸m¡H

TOP

¦^´_ 4# c_c_lai

¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

«D±`·PÁª©¥Dªº«ü¥¿¡A¥H©¹²ßºD¦s¦¨.xlsªºÀɮ׫¬ºA©Ò¥H¨S¦³¯d·N¨ì2010ª©ªº.xlsx©M.xlsm«¬ºAÀ³¥Îªº®t²§©Ê¡A½T¹ê¨ü±Ð¤F¡A¦hÁ±z¡I
¤µ°²³]¦pªG¤£¬O¨Ï¥Î  
     ¤u§@ªí1.Shapes(Application.Caller).Visible = False  ©ÎªÌ¬O   [«ö¶s 1].Visible = False ¤è¦¡¨Ó³B²z¡A¦Ó¬OÀ³¥Î  «ö¶sªº¦r«¬§ïÅÜÃC¦â ©Î «ö¶sªº¥~Æ[ªº§Îª¬¤§¥W¥Y¨Óªí¥Üªº¸Ü¡A¨º¤£ª¾¸Ó¦p¦ó¼¶¼g¡H
¦h¦¸¥´ÂZ±z¯u¤£¦n·N«ä¡I ¦A¦¸»¡Án·PÁ±z¡I

TOP

¦^´_ 6# c_c_lai
½Ð°Ñ¦ÒVBAªºShapeª«¥óªºÄÝ©Ê»¡©ú
play.gif
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥Ø«e§Úªºªí³æ¬O¥Î[«ö¶s 1].Visible = False ¤è¦¡¨Ó³B²z¡A¦]¬°¥Î ¤u§@ªí1.Shapes(Application.Caller ) .Visible = False ªº¤è¦¡±a¤Jµ{¦¡¸Ì¥X²{§ä¤£¨ì OC ªº¥¨¶°ªº°T®§¡A¦h¦¸¥´ÂZ¦A¦¸»¡Án·PÁ±z¡I

TOP

        ÀR«ä¦Û¦b : ¦¨¥\¬OÀuÂIªºµo´§¡A¥¢±Ñ¬O¯ÊÂIªº²Ö¿n¡C
ªð¦^¦Cªí ¤W¤@¥DÃD