View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Andy Andy is offline
external usenet poster
 
Posts: 414
Default Automate IE Web Query

Using the help of previous posts, I was able to figure out how to get to my
desired web page. From there, I want to put that data in Excel. I have run
out of ideas and cannot find any relevant help. I cannot manipulate the URL
to get to the web page - I had to code some javascript. Here is what I have:


Sub GetSecureTable()
Dim ie As InternetExplorer
ie.Navigate "www.url.com"

'navigate to desired web page
....

'try to get the web page into excel
'it fails miserably
With Sheet1.QueryTables.Add(Connection:=ie.LocationURL,
Destination:=Range("$A$1"))
.Name = "hist"
.WebTables = "4"
.Refresh BackgroundQuery:=False
End With

End Sub

Thanks