I have been trying to login to a website from within vba but was not succeful,
I have tried many variations of the following code
Currently I am gettingSub TestIE()
Dim oIE As InternetExplorer
Dim ieForm
Dim i As Long
Set oIE = New InternetExplorer
oIE.Visible = True
oIE.navigate "url"
Do Until oIE.readyState = READYSTATE_COMPLETE: Loop
With oIE.document
.forms("login").all("AccessCard").value = "jujj"
.forms("login").all("Webpassword").value = "jjj"
End With
Set oIE = Nothing
Set ieForm = Nothing
End Sub
right at the line indicated aboveRuntime error 91
Object Variable or With block variable not set
any idea why?
I found many ways to do that online but they all resulted in errors.
thanks a lot
Bookmarks