This will do what you want perfectly :-)
I think you have been over-complicating it. Use this
WebBrowser1.Document.All("
WebBrowser1.Document.All("
WebBrowser1.Document.All("
Main Topics
Browse All TopicsHi, I have:
Sub Main()
Me.Show
WebBrowser1.navigate "http://www.aanet.com.au/m
'sometimes there are timing issues, so issue a couple of doevents so the browser responds
DoEvents: DoEvents: DoEvents
Do While WebBrowser1.Busy 'wait until the page loads by looping
DoEvents
Loop
Set doc = WebBrowser1.document 'access the document properties of the current page
DoEvents
Do While WebBrowser1.Busy
DoEvents
Loop
'if you pull your page up in IE and you view the source,
'you can find the form variables that you want to fill in
'I'm sure there are other ways to iterate through the form
' to get them, but I never could figure it out.
returnValue = FillForm("username", "myname", False)
returnValue = FillForm("password", "mypass", False)
WebBrowser1.document.Forms
End Sub
Public Sub ClickLink(doc, LinkText As String)
For i = 0 To doc.links.length - 1
If InStr(LTrim(RTrim(doc.link
doc.links(i).Click
Exit For
End If
Next i
End Sub
Function FillForm(ByVal formtag, ByVal FillValue, ByVal isCombo As Boolean) As Boolean
Dim elemcollection As IHTMLElementCollection
Dim obj As Object
Dim element2 As HTMLInputElement
Dim element As HTMLInputElement
If Not isCombo Then
WebBrowser1.document.Forms
Else
WebBrowser1.document.Forms
End If
End Function
My problem is that the "Login" button is not being clicked - and i get an error!?
Why is this? Should I use WebBrowser1.Document.Forms
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: scatorPosted on 2004-04-21 at 05:49:51ID: 10877580
it's been a while since I fiddled with this
(0).Loginb uttonname. click should work
(0).submit
WebBrowser1.Document.Forms
if not, you might try
WebBrowser1.Document.Forms