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

[µo°Ý] VBA²M°£¹Ï¤ù°ÝÃD

[µo°Ý] VBA²M°£¹Ï¤ù°ÝÃD

±q¸ê®Æ®w¥s¥X¤@±i·Ó¤ù¶K¨ìSheet¸Ì­±¡A¶}©l¦C¦L³ø§i¡C

'´¡¤J¹Ï¤ù

    Application.ScreenUpdating = False

    Sheets("ÀËÅç¼Æ¾Ú").Select
   
    ABC = Sheets("ÀËÅç¼Æ¾Ú").Range("u13")
   
    Sheets("¤Ø¤oÀËÅç").Select
   
    ActiveSheet.Unprotect
   
    Range("B7").Select

    ActiveSheet.Pictures.Insert(ABC). _
        Select
   
    Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 190
    Selection.ShapeRange.Width = 205#
    Selection.ShapeRange.Rotation = 0#
   
    Selection.ShapeRange.ScaleWidth 1.35, msoFalse, msoScaleFromTopLeft
    Selection.ShapeRange.ScaleHeight 1.35, msoFalse, msoScaleFromTopLeft
   
    Range("A1").Select
   
    ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
        
    Sheets("ÀËÅç¼Æ¾Ú").Select
   
    Range("A1").Select

End Sub

¦ý¬O¡A¦C¦L§¹¤F­n§â·Ó¤ù§R°£ ³ºµM§R¤£±¼¬O§Úªº»yªk¦³°ÝÃD¶Ü¡H
¦bEXCEL 2003®ÉÁÙ¥¿±`¹B§@¡A³o¨â¤Ñ´«¤FEXCEL 2010 ´N²M¤£±¼¹Ï¤ù¤F¡A®`§Ú±o¤â°Ê¶i¤J¨ì¨ºSheet¥h¸Ñ¶}«OÅ@¤u§@ªí¨Ó§R°£·Ó¤ù¡C

   
'²M°£¹Ï­±
   
    Sheets("¤Ø¤oÀËÅç").Select
   
    ActiveSheet.Unprotect
   
    For Each I In ActiveSheet.Shapes
    If I.Type = msoPicture Then I.Delete
    Next
   
    ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
   
    Else
   
    End If

¦^´_ 1# pinkytortoise
  1. Sub Ex()
  2.     Sheets("¤Ø¤oÀËÅç").Select
  3.     ActiveSheet.Unprotect
  4.     For Each I In ActiveSheet.Shapes
  5.     If I.Type = msoPicture Then I.Delete
  6.     Next
  7.     ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
  8. End Sub
  9. Sub Ex1()
  10.     With Sheets("¤Ø¤oÀËÅç")
  11.         .Unprotect
  12.         For Each I In .Shapes
  13.             If I.Type = msoPicture Then I.Delete
  14.         Next
  15.         .Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
  16.     End With
  17. End Sub
½Æ»s¥N½X

TOP

¦b2010¹B³o¬qµL°ÝÃD, ¥i§_µo¤@¤UÀɤW¨Ó¸Õ¸Õ?
For Each I In ActiveSheet.Shapes
    If I.Type = msoPicture Then I.Delete
    Next
À´±oµo°Ý,µª®×´N·|¦b¨ä¤¤

¤µ¤éの¤@¬íは  ©ú¤éにない
http://kimbalko-chi.blogspot.com
http://kimbalko.blogspot.com

TOP

        ÀR«ä¦Û¦b : ·O´d¨S¦³¼Ä¤H¡A´¼¼z¤£°_·Ð´o¡C
ªð¦^¦Cªí ¤W¤@¥DÃD