vba删除Excel2007插入图片的代码
1个回答
展开全部
Sub deletePictures()
Dim sht As Worksheet
Dim pic As Shape
Dim picCount As Long
For Each sht In ActiveWorkbook.Sheets
For Each pic In sht.Shapes
If pic.Type = msoPicture Then
pic.Delete
picCount = picCount + 1
End If
Next pic
Next sht
MsgBox "已成功删除" & picCount & "个图片!"
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询