pvkvimalan
New Member
- Joined
- Dec 19, 2017
- Messages
- 27
- Office Version
- 2019
- 2016
- Platform
- Windows
Dear All,
I have about 200 Worksheets in an Excel Workbook. All the sheets contain various objects. I initially started by selecting the objects by <Find & Select> <Goto Special><Objects> and delete all. I then managed to find a VBA within MrExcel, that was able to delete the objects, but only for active sheet, which means I have to run the code every single time. Could anyone help me to apply for the workbook as a whole?
The code I used as follows,
Sub DelShp()
Dim sh As Shape
For Each sh In ActiveSheet.Shapes
sh.Delete
Next sh
End Sub
I have about 200 Worksheets in an Excel Workbook. All the sheets contain various objects. I initially started by selecting the objects by <Find & Select> <Goto Special><Objects> and delete all. I then managed to find a VBA within MrExcel, that was able to delete the objects, but only for active sheet, which means I have to run the code every single time. Could anyone help me to apply for the workbook as a whole?
The code I used as follows,
Sub DelShp()
Dim sh As Shape
For Each sh In ActiveSheet.Shapes
sh.Delete
Next sh
End Sub