Hi All
So I have this task I have been wanting to automate for a while now..
'Login to bank, scrape the transactions, and reconcilliate to my bookings'
the login form is running through an iframe, but it doesn´t seem to be a 'normal' iframe.
below code, accesses the page, and loops through the iframes of the page, but it only returns two iframes. Not the one I´m going for.
Code also includes early binding to see if I can locate a third iframe. Not happening.
Is there anyone that can crack this.. I can´t give away login details. but if someone can input values in the highlighted 'input' fields, and hit the button.(see picture linked in the end)
I will be a very happy guy..
HTML: https://ibb.co/xKkQzrp
So I have this task I have been wanting to automate for a while now..
'Login to bank, scrape the transactions, and reconcilliate to my bookings'
the login form is running through an iframe, but it doesn´t seem to be a 'normal' iframe.
below code, accesses the page, and loops through the iframes of the page, but it only returns two iframes. Not the one I´m going for.
Code also includes early binding to see if I can locate a third iframe. Not happening.
Is there anyone that can crack this.. I can´t give away login details. but if someone can input values in the highlighted 'input' fields, and hit the button.(see picture linked in the end)
I will be a very happy guy..
Code:
Option Explicit
Dim HTMLdoc As MSHTML.HTMLDocument
Dim MyBrowser As SHDocVw.InternetExplorer
Sub ConnectToNykredit()
Dim URL As String: URL = "https://mit.nykredit.dk/erhverv/"
Dim IE As InternetExplorer
Dim HTMLdoc As HTMLDocument
Dim table As HTMLTable
Dim tRow As HTMLTableRow, tCell As HTMLTableCell
Dim iframe As HTMLIFrame
Set IE = New InternetExplorer
IE.Visible = True
IE.navigate URL
While IE.Busy Or IE.readyState <> READYSTATE_COMPLETE: DoEvents: Wend
Set HTMLdoc = IE.document
For Each iframe In HTMLdoc.getElementsByTagName("IFRAME")
Debug.Print iframe.ID
Debug.Print iframe.src
Next
Set iframe = HTMLdoc.getElementsByTagName("IFRAME")(0)
Debug.Print "0 - " & iframe.src
Set iframe = HTMLdoc.getElementsByTagName("IFRAME")(1)
Debug.Print "1 - " & iframe.src
Set iframe = HTMLdoc.getElementsByTagName("IFRAME")(2)
On Error Resume Next
Debug.Print "2 - " & iframe.src
IE.Quit
Set HTMLdoc = Nothing
Set IE = Nothing
End Sub
HTML: https://ibb.co/xKkQzrp