ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Delete Pictures in excel (https://www.excelbanter.com/excel-programming/450743-delete-pictures-excel.html)

[email protected]

Delete Pictures in excel
 
Hi,

I have a macro that I use, below... this deletes all pictures form Active worksheet, it worked in excel 2000 but I am trying to use this in excel 2010 & it does not delete the pictures. Does this code need to be changed in order to work in excel 2010 and/or what should I add or change.

Thanks for any help.

Sub Del_pics()
Application.ScreenUpdating = False
'delete pictures
For Each shp In ActiveSheet.Shapes
If shp.Type = msoPicture Then
shp.Delete
End If
Next shp
End Sub


isabelle

Delete Pictures in excel
 
hi,

Sub DeleteAllPics()
Dim Pic As Object
For Each Pic In ActiveSheet.Pictures
Pic.Delete
Next Pic
End Sub

isabelle


[email protected]

Delete Pictures in excel
 
On Thursday, March 26, 2015 at 4:41:34 PM UTC-7, isabelle wrote:
hi,

Sub DeleteAllPics()
Dim Pic As Object
For Each Pic In ActiveSheet.Pictures
Pic.Delete
Next Pic
End Sub

isabelle


Thank You.


All times are GMT +1. The time now is 02:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com