Is there a way to create a macro that will create a web query that references a website in a cell on the workbook?
Is there a way to create a macro that will create a web query that references a website in a cell on the workbook?
Last edited by double a enterprises; 07-04-2010 at 09:21 PM.
yes it can be done
suppose the url is in A1
and you want download the webpage from A2 down
the macro will be soemthing like this
of course you have to modify or tweak according to yoru requirements![]()
Sub test1() With ActiveSheet.QueryTables.Add(Connection:= _ "URL;" & Range("A1").Value, Destination:=Range("A2")) .BackgroundQuery = True .TablesOnlyFromHTML = False .Refresh BackgroundQuery:=False .SaveData = True End With End Sub
you can do experiment with some web page url is A1 of activesheet.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks