I get the above error when I try and select element by classname in vba.
Dim ie As Object
Set ie = CreateObject("InternetExplorer.Application")
Dim url As String
url="https://sdsds.com"
ie.Visible = True
ie.navigate url
Set objTables = ie.Document.getElementsByTagName("table")
Set datatables = objTables(8)
Set wb = ie.Document.getElementsByClassName("wb")(0)
Strange thing is that getElementsByTagName("table")
works fine. But getElementsByClassName
throws this error. I am not sure why.