Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27220

VS 2008 question about controlling internet explorer object

$
0
0
i've had no problems working with internet explorer using VB through access and excel.

When I try to transition the code to VB.net I get a COMException error on the line of code doc = ie.document

I try to set doc = IE.document but it auto corrects to doc = ie.document

I've set a refrence to the microsoft internet controls object library as well as to the html library just like I was doing when I wrote the code into my database.


What should I be doing differently in VB.net?

Code:

  Public Sub verify(ByVal state As Integer)
        Dim IE As Object = CreateObject("internetexplorer.application")
        Dim element As mshtml.IHTMLElement
        Dim doc As mshtml.HTMLDocument
        IE.visible = True
        doc = IE.document


Viewing all articles
Browse latest Browse all 27220

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>