jbinnerz123
New Member
- Joined
- Feb 4, 2021
- Messages
- 3
- Office Version
- 365
- Platform
- Windows
Hello I am a noob but want to learn and make it easy to display data on my spreadsheet. I'm trying to get a realtime number onto my excel spreadsheet from a website that is password protected. I have the code to open the correct webpage the number is on, but then how do I get the number to show on my spreadsheet in real time. I will post the code I use to open the site, but I do not know where to go from there to get the number.
Inspecting the number I want shows :
<td align="right" class="AccountSummary" style="color: green;>-£5,79</td>
with the -£5.79 the number i want in my spreadsheet realtime. Thank you
Sub login()
Dim i As SHDocVw.InternetExplorer
Set i = New InternetExplorer
i.Visible = True
i.navigate ("website")
Do While i.readyState <> READYSTATE_COMPLETE
Dim idox As MSHTML.HTMLDocument
Set Idoc = i.document
Idoc.all.Pass.Value = "mypassword"
Dim ele As MSHTML.IHTMLElement
Dim eles As MSHTML.IHTMLElementCollection
Set eles = Idoc.getElementsByTagName("button")
For Each ele In eles
If ele.ID = "sgnBt" Then ele.click
Next
end sub
Inspecting the number I want shows :
<td align="right" class="AccountSummary" style="color: green;>-£5,79</td>
with the -£5.79 the number i want in my spreadsheet realtime. Thank you
Sub login()
Dim i As SHDocVw.InternetExplorer
Set i = New InternetExplorer
i.Visible = True
i.navigate ("website")
Do While i.readyState <> READYSTATE_COMPLETE
Dim idox As MSHTML.HTMLDocument
Set Idoc = i.document
Idoc.all.Pass.Value = "mypassword"
Dim ele As MSHTML.IHTMLElement
Dim eles As MSHTML.IHTMLElementCollection
Set eles = Idoc.getElementsByTagName("button")
For Each ele In eles
If ele.ID = "sgnBt" Then ele.click
Next
end sub