
WebBrowser Control Problem , simulating submit button
I have had this problem myself. 2 things you can try.
1) Most web pages only have one form so send a zero instead of the
name of the form.
wb.Document.Forms(0).submit
2) Has the document fully loaded? I usually set a boolean in the
DocumentComplete event and test that before I attempt to fill any
elements or submit anything.
-Tim
Quote:
> Hi All,
> Hopefully someone may have come across this problem, I have a vb 6 form with
> webbrowser control (wb)
> at form load, wb navigates to a particular page and then should
> automatically fill in a form and simulate clicking of the submit button.
> I've used this technique before with no problem but for some reason today i
> can make it work, it keeps coming back with error 438 : object doesnt
> support this property or method and the line it falls over on is the submit
> line. here is a snippet of code.
> wb.Document.Forms("form1").elements("emailaddress").Value = email.Text
> wb.Document.Forms("form1").submit
> the form is there, but it just cant see the submit method ? Any Ideas ?
> Any advice / words of wisdom appreciated...
> Dave Brown