I need a macro to delete all of the oleobjects within a named range. When the rows are hidden, all the objects from the hidden rows pile up in the named range "Topics". I tried to adapt this code from one that deletes shapes in a range:
Public Sub Test()
Dim Oleo As OLEObject
'here is where it returns "type mismatch":
For Each Oleo In ActiveSheet.Shapes
If Not Application.Intersect(Oleo.TopLeftCell, ActiveSheet.Range("topics")) Is Nothing Then
Oleo.Delete
End If
Next
End Sub
If anyone can help I will write you a strong recommendation to Santa --and I happen to have some pull at The Pole!
~Willardio~
Bookmarks