ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Deleting pictures from multiple worksheets (https://www.excelbanter.com/excel-discussion-misc-queries/123593-deleting-pictures-multiple-worksheets.html)

dford

Deleting pictures from multiple worksheets
 
I have inserted a picture on several worksheets. It is the same picture for
all sheets. i was able to insert them by selecting all the sheets and then
inserting. I can't seem to delete the pictures by selecting all the sheets. I
have to delete them one at a time. Is there a way to delete all at the same
time?

JMay

Deleting pictures from multiple worksheets
 
Dford: I found this just Googling It was in MS.Excel.Misc NG

This little sub will remove all pictures on all worksheets in a
workbook:


Sub pic_puller()
Dim w As Worksheet
For Each w In ActiveWorkbook.Worksheets
w.Activate
pCount = w.Shapes.Count
If pCount 0 Then
For i = pCount To 1 Step -1
w.Shapes(i).Select
Selection.Cut
Next
End If
Next
End Sub
--
By Gary's Student <<<<<<

HTH\
Jim May




"dford" wrote in message
:

I have inserted a picture on several worksheets. It is the same picture for
all sheets. i was able to insert them by selecting all the sheets and then
inserting. I can't seem to delete the pictures by selecting all the sheets. I
have to delete them one at a time. Is there a way to delete all at the same
time?



dford

Deleting pictures from multiple worksheets
 
Thanks. That worked great!

"JMay" wrote:

Dford: I found this just Googling It was in MS.Excel.Misc NG

This little sub will remove all pictures on all worksheets in a
workbook:


Sub pic_puller()
Dim w As Worksheet
For Each w In ActiveWorkbook.Worksheets
w.Activate
pCount = w.Shapes.Count
If pCount 0 Then
For i = pCount To 1 Step -1
w.Shapes(i).Select
Selection.Cut
Next
End If
Next
End Sub
--
By Gary's Student <<<<<<

HTH\
Jim May




"dford" wrote in message
:

I have inserted a picture on several worksheets. It is the same picture for
all sheets. i was able to insert them by selecting all the sheets and then
inserting. I can't seem to delete the pictures by selecting all the sheets. I
have to delete them one at a time. Is there a way to delete all at the same
time?





All times are GMT +1. The time now is 06:07 PM.

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