Webpage Navigation

B

bodhisatvaofboogie

I'm having difficulty navigating around within a webpage with my macro. I'm
trying to utilize:

With .Document.Forms(0)
.Item("Search").Click
End With

and it doesn't seem to be working. The .Item("Search").Click is where it
errors out.

With .Document.Forms(0)
.Item("UserName").Value = "Your UserName Here"
.Item("Password").Value = "Your Password Here"
.Item("Submit").Click
End With

I get the same issue with this....all works fine until the
..Item("Submit").Click It will enter my name and password, then bug out.
What am I doning wrong with the syntax?

Thanks!!!
 
B

bodhisatvaofboogie

That worked great for the logon information page. However, if I'm doing just
regular run of the mill navigation throughout the webpage, what is the basic
code for that sort of thing. For example, how do I utilize a "Search"
button? Make sense?

Thanks in advance.
 
D

Dave Miller

You would either need to identify the ID of the button and use:

..item("Button ID Here").click

Or you would have to loop through all the items in the document until
you reached the name of the item you want to click:

For i = 0 To .Items.Length - 1
With .Item(i)
If .Name = "Name of Button" Then
.Click
End If
End With
Next


This process is the same for any item in the document (textbox,
checkbox, ...)
 

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