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

[µo°Ý] ½Ð±ÐÃö©ó¦p¦óÅý¨C¤@­Ósheetªº¹Ï¤ù§¡¦³ÂIÀ»©ñ¤jÁY¤p®ÄªG

[µo°Ý] ½Ð±ÐÃö©ó¦p¦óÅý¨C¤@­Ósheetªº¹Ï¤ù§¡¦³ÂIÀ»©ñ¤jÁY¤p®ÄªG

Dear ¤j¤j:
³o­Ó°ÝÃD¥ý«e¤w¦³µo°Ý¹L,¦ý¤p§Ì·Q­n¥Î³o­Óµ{¦¡±N¨C¤@­Ósheetªº¹Ï¤ù§¡°µÂI©ñ¤jÁY¤pªº®ÄªG,§¡¤£±o¨ä®ÄªG,¥i§_½Ð¤j®aÀ°­Ó¦£­×¥¿¤@¤U,·P®¦!

ShowPicture.zip (391.92 KB)

¦^´_ 1# cmo140497
  1. Private Sub Workbook_Open()
  2. Set dic = CreateObject("Scripting.Dictionary")
  3. Dim Sh As Shape
  4. For Each sht In Sheets
  5. For Each Sh In sht.Shapes
  6.    If Sh.Name Like "¹Ï¤ù*" Then Sh.OnAction = "nn": dic(Sh.Name & "h") _
  7.    = Sh.Height:: dic(Sh.Name & "w") = Sh.Width
  8. Next
  9. Next
  10. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 1# cmo140497
¸Õ¸Õ¬Ý
  1. Private Sub Workbook_Open()
  2.     Set dic = CreateObject("Scripting.Dictionary")
  3.     Dim Sh As Worksheet
  4.     Dim S As Shape                  'Shape: ¥Nªí¹Ï§Î¼h¤¤ªºª«¥ó¡A¦p§Ö¨ú¹Ï®×¡B¤âø¦hÃä§Î¡BOLE ª«¥ó©Î¹Ï¤ù
  5.    
  6.     For Each Sh In Sheets           'Sheets: ¤u§@ªí ª«¥óªº¶°¦X
  7.          For Each S In Sh.Shapes    'Shapes: Shape  ª«¥óªº¶°¦X
  8.         If S.Name Like "¹Ï¤ù*" Then S.OnAction = "nn": dic(S.Name & "h") _
  9.             = S.Height: dic(S.Name & "w") = S.Width
  10.         Next
  11.     Next
  12. End Sub

  13. Private Sub Workbook_BeforeClose(Cancel As Boolean)
  14.   '*** ·s¼Wµ{¦¡:   ÁÙ­ì ¹Ï¤ùªº¤j¤p  ******
  15.     Dim Sh As Worksheet
  16.     Dim S As Shape                  'Shape: ¥Nªí¹Ï§Î¼h¤¤ªºª«¥ó¡A¦p§Ö¨ú¹Ï®×¡B¤âø¦hÃä§Î¡BOLE ª«¥ó©Î¹Ï¤ù
  17.     For Each Sh In Sheets           'Sheets: ¤u§@ªí ª«¥óªº¶°¦X
  18.          For Each S In Sh.Shapes    'Shapes: Shape  ª«¥óªº¶°¦X
  19.         If S.Name Like "¹Ï¤ù*" Then S.Height = dic(S.Name & "h"): S.Width = dic(S.Name & "w")
  20.         Next
  21.     Next
  22. End Sub
½Æ»s¥N½X

TOP

(¤w¸Ñ¨M)½Ð±ÐÃö©ó¦p¦óÅý¨C¤@­Ósheetªº¹Ï¤ù§¡¦³ÂIÀ»©ñ¤jÁY¤p®ÄªG

¦^´_ 2# Hsieh


    ·PÁª©¥Dªº«ü¥¿,½Ð±Ðª©¥D¬°¤°»ò¤p§Ì¥Îactivesheet.shape¤Ï¦Ó¤£¦æ,¥t¬°¤°»ò¥u¯à¥ÎPrivate Sub Workbook_Open(),¦Ó¤£¦æ¥ÎPrivate Sub Workbook_SheetActivate(ByVal Sh As Object),¤p§Ì·M昩,¦A·Ð½Ðª©¥D«ü¾É¤@¤U¤p§Ì,ÁÂÁÂ!

TOP

¦^´_ 3# GBKEE


    Dear ª©¥D :
¥i§_¦A½Ð±Ð±z,·s¼W¹Ï¤ù¬O¤£¬O¤@©w±o¦sÀÉ,¥t¥~sheet1¤§¹Ï¤ù,ÂIÀ»¤Ï¦ÓÁY¤p,sheet2«hok,¤£ª¾¹D¬°¤°»ò?¦A½Ð±z¨ó§U«ü¥¿,·P®¦!

ShowPicture.zip (678.91 KB)

TOP

¦^´_ 4# cmo140497

SheetActivate¨Æ¥óµ{§Ç·íµM¤]¥i¥H
­n¥Î
for each pic in Sh.Shapes
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

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

¦^´_ 5# cmo140497
·s¼W¹Ï¤ù¬O¤£¬O¤@©w±o¦sÀÉ: ¥iÀH§Aªº·N.
Sheet1 4­Ó¹Ï¤ù¦WºÙ¬° Picture 1,Picture 2,¹Ï¤ù 1,¹Ï¤ù 2
Sheet2 3­Ó¹Ï¤ù¦WºÙ¬° ¹Ï¤ù 3,¹Ï¤ù 2,¹Ï¤ù 1
If Sh.Name Like "¹Ï¤ù*" Then   : µLªkŪ¥XSheet1  Picture 1,Picture 2 ªº¹Ï¤ù
­×§ï¥H ¹Ï®×Ãþ«¬= ·Ó¤ù,§@¬°§PÂ_.
  1. Private Sub Workbook_Open()
  2.     Set dic = CreateObject("Scripting.Dictionary")
  3.     Dim Sh As Worksheet
  4.     Dim S As Shape                          'Shape: ¥Nªí¹Ï§Î¼h¤¤ªºª«¥ó¡A¦p§Ö¨ú¹Ï®×¡B¤âø¦hÃä§Î¡BOLE ª«¥ó©Î¹Ï¤ù
  5.     For Each Sh In Sheets                   'Sheets: ¤u§@ªí ª«¥óªº¶°¦X
  6.         For Each S In Sh.Shapes             'Shapes: Shape  ª«¥óªº¶°¦X
  7.             If S.Type = msoPicture Then     'S.Type(¹Ï®×Ãþ«¬): ·Ó¤ù
  8.                 S.OnAction = "nn"
  9.                 dic(S.Name & "h") = S.Height
  10.                 dic(S.Name & "w") = S.Width
  11.             End If
  12.         Next
  13.     Next
  14. End Sub
  15. Private Sub Workbook_BeforeClose(Cancel As Boolean)
  16.   '*** ·s¼Wµ{¦¡:   ÁÙ­ì ¹Ï¤ùªº¤j¤p  ******
  17.     Dim Sh As Worksheet
  18.     Dim S As Shape                  'Shape: ¥Nªí¹Ï§Î¼h¤¤ªºª«¥ó¡A¦p§Ö¨ú¹Ï®×¡B¤âø¦hÃä§Î¡BOLE ª«¥ó©Î¹Ï¤ù
  19.     For Each Sh In Sheets           'Sheets: ¤u§@ªí ª«¥óªº¶°¦X
  20.         For Each S In Sh.Shapes    'Shapes: Shape  ª«¥óªº¶°¦X
  21.             If S.Type = msoPicture Then S.Height = dic(S.Name & "h"): S.Width = dic(S.Name & "w")
  22.         Next
  23.     Next
  24. End Sub
½Æ»s¥N½X

TOP

¦^´_ 6# Hsieh


    ·PÁª©¥D¦A¦¸¦a¤£§[«ü¥¿,¤p§Ì¥i§_¦A°Ý¤@­Ó°ÝÃD,°²¦p¹Ï¤ù¦p¦ó¸m¤¤(©óÀx¦s®æ¤º),ÁÂÁÂ!

TOP

        ÀR«ä¦Û¦b : ¤£­nÀH¤ß©Ò±ý¡A­nÀH¤ß±Ð¨|¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD