Filling in web page through code...

K

Kevin

I've got an app in VB6 that uses a webbrowser control to go to a web
site, enter text in a box, click the Submit button and fetch the
results.

Apparently the code won't translate to VB2005. The program stops on
this line:

WebBrowser1.Document.DomDocument.All("address1").Value = MyString

with the error "Object reference not set to an instance of an object"
and the Upgrade Warnings above the line of code show:

Couldn't resolve default property of object WebBrowser1.Document.All.

What is the correct syntax for this, or is there a better way of doing
this?
 
G

GhostInAK

Hello Kevin,

Why don't you take a look at the webbrowser control's properties and then
come back if you cant figure it out.

-Boo
 
K

Kevin

Boo,
Thanks for the response. I did figure it out. I wasn't waiting for the
WebBrowser1.DocumentComplete event. Everything's working fine once the
page loads.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top