I am trying to automate my daily tasks by VBA script automatically login into my bank account and returning some data from the website. However, I cannot write such macro which could login in into this website - https://online.mbank.pl/pl/Login.
I wrote the following macro which works well with "normal" websites such google (based on input box IDs), but does not work with bank websites returning, the following error:
Run-time error 424: Object required
Below code for google.com:
Sub LoginHttps()
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
With IE
.Top = 0
.Left = 0
.Height = 1000
.Width = 1250
.Visible = True
.Navigate "https://www.google.com/?gfe_rd=cr&ei=N-TZVaPMAdCv8wf19aH4Bw&gws_rd=cr&fg=1"
Do While .Busy Or Not .ReadyState = 4: DoEvents: Loop
.Document.getElementById("lst-ib").Value = "input"
End With
End Sub
and code for bank website which generates an 424 error:
Sub LoginHttps()
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
With IE
.Top = 0
.Left = 0
.Height = 1000
.Width = 1250
.Visible = True
.Navigate "https://online.mbank.pl/pl/Login"
Do While .Busy Or Not .ReadyState = 4: DoEvents: Loop
.Document.getElementById("userID").Value = "input"
End With
End Sub
I am wondering whether there is any method to access these input boxes by VBA or it is secured by bank programmers.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…