Hi,
I have a For Each statement that works fine under an if statement.
For Each ele In ieDocLand.getElementById("rg.1.117786.128366_ctl00").getElementsByTagName("div")
If ele.innerText = "No records to display." Then
If LoadWebPage(ieApp,myURL) = False Then
'MsgBox "Couldn't open page"
End If
Exit Sub
End If
Next
I tried putting it into a Case statement & I an get Error "object required". Thats fine too I know that the object isnt there all the time, so Excel is correct. But I want to test for its existence of my object with a Case statement.
I tried Select Case True & I dont get the Error however I get false even when the object is present. I guess because the For loop is in the Case Statement & not being executed.
So yeah Im stuck any help would be appreciated, TIA
Bookmarks