vzachin
02-11-2009, 07:49 PM
hi,
i'm need to access an intranet website which requires me to navigate 3 screens before i get to the screen to input data and evoke a query.
i can access the site but i'm having trouble with the 1st screen. there's a button that says LOGIN that i can click or i can tab 2 times and hit the enter key.
i don't know how to evoke a button click so i tried using SendKeys but i can't seem to get that to work.
this is from the source code:
<center><a href="InitialLogin.jsp">Login</a></center>
</form> </div>
here's my code so far
Sub Intranet()
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
On Error GoTo 1
With IE
.Navigate "http://myintranetsite.jsp"
.Visible = True
AppActivate "Internet Explorer"
SendKeys ("{TAB}")
SendKeys ("{TAB}")
SendKeys ("{ENTER}")
End With
Set IE = Nothing
Exit Sub
1: MsgBox Err.Description
IE.Quit
Set IE = Nothing
End Sub
this will be the first of a few more questions one step at a time
thanks
zach
i'm need to access an intranet website which requires me to navigate 3 screens before i get to the screen to input data and evoke a query.
i can access the site but i'm having trouble with the 1st screen. there's a button that says LOGIN that i can click or i can tab 2 times and hit the enter key.
i don't know how to evoke a button click so i tried using SendKeys but i can't seem to get that to work.
this is from the source code:
<center><a href="InitialLogin.jsp">Login</a></center>
</form> </div>
here's my code so far
Sub Intranet()
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
On Error GoTo 1
With IE
.Navigate "http://myintranetsite.jsp"
.Visible = True
AppActivate "Internet Explorer"
SendKeys ("{TAB}")
SendKeys ("{TAB}")
SendKeys ("{ENTER}")
End With
Set IE = Nothing
Exit Sub
1: MsgBox Err.Description
IE.Quit
Set IE = Nothing
End Sub
this will be the first of a few more questions one step at a time
thanks
zach