Sorry guys, I CTRL-A my original post.. of course.
It was just simply inquiring about a late binding error I was getting with Option Strict On, which was also creating really odd adverse effects during publishing the console app. Doing the below, thanks to very helpful answers solved my issues.
I would say after getting a better grasp on late and early binding, I can see why people shoot for early, there are a lot of really cool and helpful tools that come with it, and it also seems to really aid in avoiding those crash issues.
Dim ie As InternetExplorer Dim document As HTMLDocument Dim ele As HTMLInputElement ie = New InternetExplorer
ie.Visible = True
ie.Navigate("www.google.com")
While ie.ReadyState <> 4
End While
document = CType(ie.Document, HTMLDocument)
ele = CType(document.getElementById("lst-ib"), HTMLInputElement)
ele.value = "test"
I hope this can help someone else, as it helped me. You can see we have used early binding in the example :)
Documentproperty which is of type ofHtmlDocument. Then that type has a method calledGetElementByIdwhich returns anHtmlElement. Right now none of your code will work... Also, you`re using old vb6 leftovers, this is not vb... - TrevorDocumentproperty. In the Object Browser, expand the the InternetExploreClass node and then expand the "Base Types" node. Click through the various interfaces until you findDocument. It is defined on the IWebBrowser2 Interface. The getElementById Method is defined on IHTMLDocument3. - TnTinMn