Forum Discussion
tristaanogre
15 years agoEsteemed Contributor
You have several problems with your code.
First, you're not "dimming" your variables so scope is rather messed up.
Secondly, you're not returning any value for your function so any calls to the function simply execute the function and don't return anything.
I modified your code and came up with the following.
First, you're not "dimming" your variables so scope is rather messed up.
Secondly, you're not returning any value for your function so any calls to the function simply execute the function and don't return anything.
I modified your code and came up with the following.
Function page(URL)
Set page = Sys.Process("iexplore").Page("*")
Call page.ToURL(URL)
Call page.Wait
End Function
sub tester
dim PageObj
Call TestedApps.iexplore.Run
Set PageObj = page("http://server1/login.asp")
PageObj.document.all.Item("txtLoginId").Value = "UID"
PageObj.document.all.Item("txtPassword").Value = "Pwd"
PageObj.document.all.Item("cmbLogin").Click
end sub