I'd like to extract the SIC code from a given webpage such as this:
EDGAR Search Results
You can see the SIC in the blue band near the top (SIC: 5331).
In IE you can View Source (right click on the page above) and search for SIC in the XML and this is what I'd like to return to a VBA variable so I can store it in an Excel sheet.
So far I've been able to cobble this together, though I can't tell if it's correct, from reading various posts but I can't figure out how to search for the the SIC. Any help or direction is appreciated.
EDGAR Search Results
You can see the SIC in the blue band near the top (SIC: 5331).
In IE you can View Source (right click on the page above) and search for SIC in the XML and this is what I'd like to return to a VBA variable so I can store it in an Excel sheet.
So far I've been able to cobble this together, though I can't tell if it's correct, from reading various posts but I can't figure out how to search for the the SIC. Any help or direction is appreciated.
Rich (BB code):
Sub test3()
Dim xDoc As MSXML2.DOMDocument30
Set xDoc = New MSXML2.DOMDocument30
xDoc.async = False
xDoc.Load ("EDGAR Search Results")
'search for SIC
Set xDoc = Nothing
End Sub