saving file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello

I have a cell with a date in it. I would like to save the workbook with the file name the same as the date PLUS one day. I can save the file using the date in the cell without any problems using

d = Format(Range("c1"), "mm-d-yy"
ActiveWorkbook.SaveAs Filename:=
"c\GM Capital Group\Portfolio\" & d & ".xls

But I can't figure out how to save the same file with the next day's. i.e. if c1 = 04-08-2004 then save the file with file name 04-09-2004.xls. I know there is the "DateAdd" function, but I can't figure out how to incorporate it

Ideally, I would like to have it use the next business day, taking into account weekends and holidays, but that might be asking for too much..

Any thoughts
Thanks, Natha
 
Hi
change the line
d = Format(Range("c1"), "mm-d-yy")

to
d = Format(Range("c1").value+1, "mm-d-yy")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Save Macro with date in name 1
Save Sheets In Different Files 2
Mysterious re date Format 1
File Save Properties 3
SAVE AS MACRO 4
PLEASE HELP!! SAVE MACRO 2
File name being changed 2
Name work sheet 2

Back
Top