ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Get Macro to Repeat on Each Worksheet (https://www.excelbanter.com/excel-discussion-misc-queries/148737-get-macro-repeat-each-worksheet.html)

rgatto

Get Macro to Repeat on Each Worksheet
 
I have a macro I recorded that works in whatever worksheet I'm in to remove
objects. I would like it to work for all worksheets in whatever workbook I'm
in. Does anyone know how to write that into the macro?

Thanks!

Jim Rech

Get Macro to Repeat on Each Worksheet
 
Sub DelAllObjs()
Dim WS As Worksheet
For Each WS In Worksheets
WS.DrawingObjects.Delete
Next
End Sub


--
Jim
"rgatto" wrote in message
...
I have a macro I recorded that works in whatever worksheet I'm in to remove
objects. I would like it to work for all worksheets in whatever workbook
I'm
in. Does anyone know how to write that into the macro?

Thanks!




rgatto

Get Macro to Repeat on Each Worksheet
 
Thanks that worked perfect!

"Jim Rech" wrote:

Sub DelAllObjs()
Dim WS As Worksheet
For Each WS In Worksheets
WS.DrawingObjects.Delete
Next
End Sub


--
Jim
"rgatto" wrote in message
...
I have a macro I recorded that works in whatever worksheet I'm in to remove
objects. I would like it to work for all worksheets in whatever workbook
I'm
in. Does anyone know how to write that into the macro?

Thanks!






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

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