0
votes

I'm trying to write a macro that downloads data into a file, where the file name contains yesterdays date.

"TEXT;http://www.mydomainname.co.uk/price_spiders_competitors_prices_gb/GBPS AEG " & Format(Today() - 1, "yyyy-mm-dd") & " higher_than.csv" _ , Destination:=Range("$A$1"))

This isn't working

"TEXT;http://www.mydomainname.co.uk/price_spiders_competitors_prices_gb/GBPS AEG 2013-02-06 higher_than.csv" _ , Destination:=Range("$A$1"))

This does!

Any ideas, I have a feeling the dashes are causing an issue but it also doesn't seem to like my Today -1!

Thanks for any help

1

1 Answers

0
votes

Try function 'Now()' instead of 'Today()' to get the current date and time.

As far as i know, excel doesn't have the function 'today()' in VBA. You can use 'today()' in a formula but not in VBA.