Home » Questions » Computers [ Ask a new question ]

Easy way to select all HTML Objects for deletion in MS Excel

Easy way to select all HTML Objects for deletion in MS Excel

So, here's the situation:

Asked by: Guest | Views: 283
Total answers/comments: 1
Guest [Entry]

"You can use Goto>Special>Objects to select all objects in the active sheet, then delete them in one go. This will remove all non-form HTML elements if data has been pasted in from a web page.

To wipe out any pasted form controls as well would need a bit of VBA to delete in one go:

Sub DeleteObjects()
Dim obj As Object
For Each obj In ActiveSheet.Shapes
obj.Delete
Next
End Sub"