I have lots of VBA macros that open an IE explorer window and download data
from a URL. Is the sharepoint a webpage or a database? If you can provied a
URL that would help.
It seem like yyou have some sort of table. Webpages have multiple tables
and it is sometimes tricky in identify the correct table. What soemtimes
help is to perform a webquery to identify the corect table. You can use the
worksheet menu
Data - Import External Data - Import Data - New Webquery.
Yo can even record a macro while performing the operation to get a macro
that may help. Here is a simple macro that uses the IE explorer.
Sub GetZipCodes()
ZIPCODE = InputBox("Enter 5 digit zipcode : ")
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
URL = "
http://zip4.usps.com/zip4/citytown_zip.jsp"
'get web page
IE.Navigate2 URL
Do While IE.readyState <> 4 And _
IE.busy = True
DoEvents
Loop
Set Form = IE.document.getElementsByTagname("Form")
Set zip5 = IE.document.getElementById("zip5")
zip5.Value = ZIPCODE
Set ZipCodebutton = Form(0).onsubmit
Form(0).submit
Do While IE.busy = True
DoEvents
Loop
Set Table = IE.document.getElementsByTagname("Table")
Location = Table(0).Rows(2).innertext
IE.Quit
MsgBox ("Zip code = " & ZIPCODE & " City/State = " & Location)
End Sub