NikolaJovanovic
New Member
- Joined
- Jan 31, 2016
- Messages
- 24
Good evening to all,
I have been struggling since last week with this.
The purpose of the macro is to automatically sign in, get the Statement, and proceed to the next account, gets the statement, signs out, goes to another Bank...and so on.
But I can not even program it to log in.
I get the run-time error '91':
Object Variable or With block variable not set
The code stops at:
without input.
I can not figure out why.
Could somebody please help me..
I have these References checked.
Visual Basic For Application
Microsoft Excel 14.0 Object Library
OLE Automation
Microsoft Office 14,0 Object Library
Microsoft HTML Object Library
Microsoft Internet Controls
Microsoft Forms 2.0 Object Library
P.S. You can see the http when you load the page.
I have been struggling since last week with this.
The purpose of the macro is to automatically sign in, get the Statement, and proceed to the next account, gets the statement, signs out, goes to another Bank...and so on.
But I can not even program it to log in.
I get the run-time error '91':
Object Variable or With block variable not set
The code stops at:
Code:
html.getElementById("ctl00_ctl00_Utilizador").Value = "itsme"
I can not figure out why.
Could somebody please help me..
I have these References checked.
Visual Basic For Application
Microsoft Excel 14.0 Object Library
OLE Automation
Microsoft Office 14,0 Object Library
Microsoft HTML Object Library
Microsoft Internet Controls
Microsoft Forms 2.0 Object Library
Code:
Sub LogIn()
Dim ie As InternetExplorer
Dim html As HTMLDocument
Set ie = New InternetExplorer
ie.Visible = True
ie.Navigate "https://emp.bancobai.ao/"
Do While ie.ReadyState <> READYSTATE_COMPLETE
Application.StatusBar = "Trying to go to StackOverflow ..."
DoEvents
Loop
Set html = ie.Document
html.getElementById("ctl00_ctl00_Utilizador").Value = "itsme"
html.getElementById("ctl00_ctl00_Password").Value = "123"
End Sub
P.S. You can see the http when you load the page.