Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
change the line d = Format(Range("c1"), "mm-d-yy") to d = Format(Range("c1").value+1, "mm-d-yy") -- Regards Frank Kabel Frankfurt, Germany nathan wrote: 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, Nathan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Saving Excel 2007 file in 2003 creates very large file | Excel Discussion (Misc queries) | |||
Confused here Prevent Saving File - but allow ONLY File SAVEAS Met | Excel Discussion (Misc queries) | |||
Saving worksheet in new file with date AND cell value as file name | Excel Discussion (Misc queries) | |||
Text file saving, setting file origin | Excel Discussion (Misc queries) | |||
How do I stop Excel 2000 from saving file history from file that . | Excel Discussion (Misc queries) |