Hi,
I am struggling to find an example of code that will open an URL and login to the site automatically.
I am trying to login to this site: id.caspio_com
One example shows error at
Can anyone assist please?
Tried to post the full code example but will not accept!
Any working sample code will be greatly appreciated please!
I am struggling to find an example of code that will open an URL and login to the site automatically.
I am trying to login to this site: id.caspio_com
One example shows error at
Code:
oLogin.value = Username with the error "Object variable or With block variable not set" - run-time error '91'
Can anyone assist please?
Code:
Public Function OpenURL2(TheURL as string, TheUserName As String, Passwd As String)
Const Url$ = TheURL
Dim ie As Object
Set ie = CreateObject("InternetExplorer.Application")
With ie
.Navigate Url
ieBusy ie
.Visible = True
Dim oLogin As Object, oPassword As Object
Set oLogin = .Document.getElementsByName("ecp_param_userId")(0)
Set oPassword = .Document.getElementsByName("ecp_param_password")(0)
oLogin.Value = TheUserName
oPassword.Value = Passwd
.Document.Forms(0).submit
End With
End Function
Tried to post the full code example but will not accept!
Any working sample code will be greatly appreciated please!