Task:

I want to create a macro to down load data from a website each day and place it into excel. The difficulty is that the data is contained with a different file each day, so I want the full URL to also change each day.


Problem:
When I created a macro of a webquery, the URL link is hard coded in the VBA code. Instead I would like the code to reference a spreadsheet cell where the URL can change. i.e. "A2" will conntain the weblink instead.


Currrent VBA code (extract):

With ActiveSheet.QueryTables.Add(Connection:= _
"URL;ftp://user:password@ftp.website.com/download/1110d_26.05_", Destination _
:=Range("D20"))




I have played around trying to replace the web address with a cell reference but cannot get it to work. Can someone please help?

Thanks.