having trouble passing an object to a function. Basically I'm trying to delete all childnodes but do not know why i'm getting 'Object' required err when passing the object oItem to the function.
Dim Nodelist As Object
Dim oItem As Object
Set Nodelist = ie1.Document.All
For Each oItem In Nodelist
If oItem.tagName = "A" Then
DeleteTree (oItem)
End if
Next
-----------------------------------------
Function DeleteTree(ByVal node As Object)
Dim Child, ChildNodes
Set ChildNodes = node.All
For Each Child In ChildNodes
Child.removeNode
Next Child
node.removeNode
End Function