Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get data from a webpage

Status
Not open for further replies.

MrMajik

IS-IT--Management
Apr 2, 2002
267
I searched the VB6 help files and the Internet and can't find any information on how to do this. Maybe you know how to do this:

I want my VB6 code to go to a web page and download just a piece (table) from the website into a new text file.

Microsoft Excel will get the data from the website table using the New Web Query from Get External Data from the Data menu. I located the query file but it was not any help. So I created a new Web Query while recording the macro. I could not get the VB code that the macro generated to work in my VB program.

Do you know how to do this?


Thank you.

MrMajik

Everything should be made as simple as possible, but not simpler
--Albert Einstein


 
'Maybe you can modify this Excel VBA code...from a tek-tips 'user known as "TBL"


Sub Read_URL_Test()

With ActiveSheet.QueryTables.Add(Connection:="URL; _
Destination:=Range("a1"))'write web-page to sheet

.BackgroundQuery = True
.TablesOnlyFromHTML = False
.Refresh BackgroundQuery:=False
.SaveData = True
End With
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top