J
James
Hi All,
I have about 90 different worksheets and majority of worksheets have a
imagine file called 'picture 1'.
All I am trying to do is delete this picture from every worksheets. So
far I've done:
For Each ws In ThisWorkbook.Worksheets
Set DelPic = ws.Shapes("Picture 1")
'DelPic.Delete
Next
This macro runs fine if there is a picture 1 in the worksheet but
because some of the worksheets don't really have a picture. It creates
an error. How do I condition it so it only deletes 'picture 1' if
there is one in the worksheet?
Thank you so much
Regards
James
I have about 90 different worksheets and majority of worksheets have a
imagine file called 'picture 1'.
All I am trying to do is delete this picture from every worksheets. So
far I've done:
For Each ws In ThisWorkbook.Worksheets
Set DelPic = ws.Shapes("Picture 1")
'DelPic.Delete
Next
This macro runs fine if there is a picture 1 in the worksheet but
because some of the worksheets don't really have a picture. It creates
an error. How do I condition it so it only deletes 'picture 1' if
there is one in the worksheet?
Thank you so much
Regards
James