Sequential Save Name

  • Thread starter Thread starter Mike Connor
  • Start date Start date
M

Mike Connor

I have set up a spreadsheet to go out to Bloomberg.com to
get certain rates on a daily basis, I have task manager
opening the spreadsheet at 5 PM everyday, and it updates
on opening, THEN I save it with that days date, so that I
can refer back to the historical rates on a daily basis.

Currently I save the spreadsheet, is there anyway for me
to automate the entire process, so that it will open,
update and SAVE itself with THE days date as a name? I
hope that I can do this, and hope that I am not expecting
too much, Thanks, Mike Connor
 
Mike,

Yes it can be done, but it will need VBA.

Use the macro recorder to record a macro that does all that you describe,
just make sure that you SaveAS with a date value, for example 'myFile
20-Aug.2003.xls'.

Then go to the VB IDE, and when you find a line that looks like

ActiveWorkbook.SaveAs Filename:= _
"C:\myDir\myFile 20-Aug-2003", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False _
, CreateBackup:=False

to

ActiveWorkbok.SaveAs Filename:= _
"C:\myDir\myFile " & Format(Date,"dd-mmm-yyyy") & ".xls", _
FileFormat:=xlNormal

changing the directory and filename to suit.
 
Back
Top