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

[µo°Ý] ½Ð±Ð:¦p¦ó¦b¨Ï¥Îactivesheet«á,¦A­­¨î¯S©w¤u§@ªí¤£°õ¦æµ{¦¡

[µo°Ý] ½Ð±Ð:¦p¦ó¦b¨Ï¥Îactivesheet«á,¦A­­¨î¯S©w¤u§@ªí¤£°õ¦æµ{¦¡

¥»©«³Ì«á¥Ñ GBKEE ©ó 2013-1-14 15:40 ½s¿è

Dear :
¤p§Ì­×¥¿©ó¦U¤u§@ªí¤W°õ¦æ¹Ï¤ù©ñ¤jÁY¤p°Ê§@,¦]¤u§@ªí¼Æµø¸ü¤JÀɮצh¤Ö¤£¤@©w,¦ý¦]¨ä¦³¤G­¶¤u§@ªí¤£»Ý°µ¨ä¹Ï¤ù©ñ¤jÁY¤p°Ê§@,¤£ª¾­n¦p¦ó­×¥¿,½Ð¦U¦ì¤j¤jÀ°¦£«ü¤Þ¤@¤U°g¬z,·P®¦!
  1. Private Sub Workbook_Open()
  2. Set dic = CreateObject("Scripting.Dictionary")
  3. Dim Sh As Shape
  4. Dim SHT As Worksheet
  5. Dim DaSht As String, CALSht As String
  6. DaSht = "DashBoard": CALSht = "CALS" ' ³o¤G­Ó¤u§@ªí¤£°µshape©ñ¤jÁY¤p°Ê§@

  7.     For Each SHT In Sheets
  8.         Do While SHT Is Nothing
  9.             If SHT.Name = DaSht Or SHT.Name = CALSht Then
  10.             Exit Do
  11.             Else
  12.                 For Each Sh In SHT.Shapes ' ³s¦Pµù¸Ñªº¤å¦r¤è¶ô©Î¹Ïªí¤]·|³Q»{¬°¬Oshape,¶}Àɮ׮ɷ|alert
  13.                 With Sh
  14.                     Sh.OnAction = "nn"
  15.                     dic(Sh.Name & "h") = Sh.Height
  16.                     dic(Sh.Name & "w") = Sh.Width
  17.                 End With
  18.                 Next
  19.             End If
  20.         Loop
  21.     Next
  22.    
  23. End Sub



  24. Sub nn()
  25. With ActiveSheet.Shapes(Application.Caller)
  26. '---Åܧ󬰦b¦Û¤vªº¦ì¸m§@©ñ¤jÁY¤pªº°Ê§@
  27.     If .Height <> dic(.Name & "h") Then
  28.     .Height = dic(.Name & "h")
  29.     .Width = dic(.Name & "w")
  30.     Else
  31.     .Height = dic(.Name & "h") * 8
  32.     .Width = dic(.Name & "w") * 8
  33.     .ZOrder msoBringToFront
  34.     End If
  35. End With
  36. End Sub
½Æ»s¥N½X
Question_20130114.zip (94.89 KB)

¦^´_ 1# cmo140497


    ¤w¦Û¦æ¸Ñ¨M¤F,·P®¦!

TOP

        ÀR«ä¦Û¦b : ¡i¥Í©R¦b©I§l¶¡¡j¦òªû»¡¡G¡u¥Í©R¦b©I§l¶¡¡C¡v¤HµLªkºÞ¦í¦Û¤vªº¥Í©R¡A§óµLªk¾×¦í¦º´Á¡AÅý¦Û¤v¥Ã¦í¤H¶¡¡C¬JµM¥Í©R¥h¨Ó³o»òµL±`¡A§Ú­Ì§óÀ³¸Ó¦n¦n¦a·R±¤¥¦¡B§Q¥Î¥¦¡B¥R¹ê¥¦¡AÅý³oµL±`¡BÄ_¶Qªº¥Í©R¡A´²µo¥¦¯uµ½¬üªº¥ú½÷¡A¬M·Ó¥X¥Í©R¯u¥¿ªº»ù­È¡C
ªð¦^¦Cªí ¤W¤@¥DÃD