script for deleting images

G

Gor_yee

Hi all, I've got an excel spreadsheet that has 10 sheets on it, is
there a script that I can run to delete only the "pictures" on the
sheet??I've also got text on the spreadsheet but i dont want that
deleted. Can you help out?
 
P

papou

Hello

Sub DeletePics()
dim i As Long
Dim sh As Shape
For i = 1 To Sheets.Count
For Each sh In Worksheets(i).Shapes
If sh.Type = msoPicture Then sh.Delete
Next sh
Next i
End Sub

HTH
Cordially
Pascal
 
G

Gor_yee

Hello

Sub DeletePics()
dim i As Long
Dim sh As Shape
For i = 1 To Sheets.Count
For Each sh In Worksheets(i).Shapes
If sh.Type = msoPicture Then sh.Delete
Hey....just tried it...its fantastic...many thanks...
 
Top