vzachin
06-30-2009, 11:02 AM
hi,
i download a daily file that is in this format.
i want to automate the download but i'm having trouble with the date
http://xxxx.xxxx.com/xxxx_xxx/xxxx/xxxx/xxxx/xxxx_20090630.dat
this is what i've tried
Sub reportdate()
dim mydat as string
mydat = Format(Date,"yyyymmdd")
Workbooks.Open Filename:= _
http://xxxx.xxxx.com/xxxx_xxx/xxxx/xxxx/xxxx/xxxx_mydat.dat"
but i could not open the file. mydat does not show today's date at all.
what am i missing?
thanks
zach
i download a daily file that is in this format.
i want to automate the download but i'm having trouble with the date
http://xxxx.xxxx.com/xxxx_xxx/xxxx/xxxx/xxxx/xxxx_20090630.dat
this is what i've tried
Sub reportdate()
dim mydat as string
mydat = Format(Date,"yyyymmdd")
Workbooks.Open Filename:= _
http://xxxx.xxxx.com/xxxx_xxx/xxxx/xxxx/xxxx/xxxx_mydat.dat"
but i could not open the file. mydat does not show today's date at all.
what am i missing?
thanks
zach