Hi, SirJB7
You are absolutely right in your comments. After all the support you gave me, and solely my fault, I am still trying to solve this very common situation, from your side , and First for me.
The reason for changing gear was the advice I got here to avoid using RE if I can. And I did.
The function I started with was to parse data from a web page. This web page is the Main Page in my Bank Statement.
Once I have retrieved the page into excel I will use the function to extract the numbers I need.
I faced a hurdle of getting to this main page , mainly the logging in ( The rest of the story you know already)
As for your security issues with Banking system, all I am doing is emulating what the bank is allowing me to do:
1. Go to a web page
2. Sign in
3. Look, print, save what I want from MY main page and leave.
If I try to do something else their highly sophisticated web site will not allow me and may be even block me from further use of MY ACCOUNT. But again your concern is well taken.
Here what I did so far and I need your help
Code:
Sub Basic_Web_Query()
Set ie = CreateObject("InternetExplorer.Application")
With ie
.Visible = True
.Navigate "https://ebanking.cibeg.com/web/guest/home"
??????????????????????????????????????????????????????????????????????????????????????/
.document.all.Item("_58_login").Value = "UserName"
.document.all.Item("_58_password").Value = "Password"
.document.forms(0).submit
Do Until .ReadyState = 4
DoEvents
Loop
End With
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;https://ebanking.cibeg.com/web/guest/home?p_p_id=58&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&saveLastPath=0&_58_struts_action=%2Flogin%2Flogin&login_event_id=0.5675766871015673&loginType=3", Destination:=Range("$B$4"))
.Name = "q?s=goog_2" ???????????????????????????
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "1,2"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub
The specific help :
As you know (you actually went to the links), to login you have to go to TWO pages before you allowed to see your main account page
1. First link is just asking you to LOG ON
2. If you press LOGON it will take you to a second page to key in your credentials (2nd page)
The code above will not do that ( see ?????) because I do not know how to click the LINK LOG ON using VBA to go to the second page.
3. The second link in the QueryTables statement is not needed because the LOG ON once pressed will take you there.(to the second page) I need to fix that too.
The purpose of the script is to reach My Account Main Page.
Once there I will dump the page to Excel and believe it or not use THE FUNCTION