Wednesday, May 11, 2016

Excel VBA Macro Delete all images / drawing objects from sheet in one go


Excel VBA Macro code to Delete all images / drawing objects from sheet in one go:


Sub DelObjects()
Dim sh As Worksheet
For Each sh In ActiveWorkbook.Sheets
          On Error Resume Next
          sh.DrawingObjects.Delete
          sh.OLEObjects.Delete
Next sh
MsgBox "Done!"
End Sub

Cheers!!

No comments:

Post a Comment