jeffreyrgomez
New Member
- Joined
- Oct 18, 2016
- Messages
- 3
Hello everyone,
I am trying to grab an ID number from my Excel sheet, navigate to a webpage, find a link using the ID number as anchor text, and extract the 'po_header_id' number from the link.
This is what I have so far:
The link html I would like to extract from is as follows:
I am not sure the correct command to do this. I have done some VBA macros before, but not many using Internet Explorer.
Thanks!
I am trying to grab an ID number from my Excel sheet, navigate to a webpage, find a link using the ID number as anchor text, and extract the 'po_header_id' number from the link.
This is what I have so far:
Code:
Dim IE As Object
Dim PoNum As String
' Create InternetExplorer Object
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
IE.Navigate "https://app.buildtopia.com/"
Application.StatusBar = "Buildtopia is loading. Please wait..."
' Wait while IE loading...
Do While IE.Busy
Application.Wait DateAdd("s", 1, Now)
Loop
' Nav instructions
If MsgBox("Log in and navigate to the list of POs matching your Excel file.", vbOKCancel) = vbCancel Then Exit Sub
'Gets anchor text
PoNum = ActiveCell.Value
MsgBox PoNum
The link html I would like to extract from is as follows:
HTML:
HR-1745-1
I am not sure the correct command to do this. I have done some VBA macros before, but not many using Internet Explorer.
Thanks!