PDA

Click to See Complete Forum and Search --> : error using webBrowser component


neil barter
Jan 24th, 2002, 09:47 AM
Hi,
I'm having trouble using the webBrowser component in VB as part of a form which hooks up to a web page.
The page has a form on it which I post info to using the syntax
WebBrowser1.Document.Forms(0).Elements(0).Value = Trim$(txtZipCode.Text) - and so on for each form element in the page---then:
WebBrowser1.Document.Forms(0).Elements(1).Click to submit. I have got the components and references the same as the original project, so I don't think that is the problem.
The code I'm using originates from http://gethelp.devx.com/techtips/web_pro/10min/10min1199/10min1199.asp , which works fine, but when I try and use the same technique to post and recieve to/from another site, I get the error "Run time error 91 - Object variable or with block variable not set". I have noticed that the page the code accesses successfully is .HTML, and I have failed accessing .ASP and .JSP pages. I also tried it with google as the form there is nearly the same as the original working versions form, but to no avail.
Has anybody encountered anything like this?
Please help!!!
Thanks,
Neil