Avatar of williamsF1

asked on 

How do I pass an object such as <A> tag from the IE.Document

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
Function DeleteTree(ByVal node As Object)
    Dim Child, ChildNodes
    Set ChildNodes = node.All
        For Each Child In ChildNodes
        Next Child
End Function

Visual Basic Classic

Avatar of undefined
Last Comment

8/22/2022 - Mon