Excel VBA 删除Excel中的所有图片

2019-04-15 12:56发布

Sub deletepic()   '删除当前sheet中的所有图片
Dim pic As Shape
For Each pic In ActiveSheet.Shapes
pic.Delete
Next
End Sub ===================================== Sub deleteallpic()  '删除excel所有sheet中的图片
Dim ws As Worksheet
Dim pic As Shape
For Each ws In Worksheets
  For Each pic In ws.Shapes
   pic.Delete
  Next
Next
End Sub