Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save file with last month date on end
Hi all, i am wanting to save a file "myFile.xls" as "myFile_Apr-08.xls".
It must always be the last month to present date. Any help would be much appreciated. -- Les |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save file with last month date on end
Les,
Try this fname = "myfile_" & DateSerial(Year(Date), Month(Date) + 1, 0) Mike "Les" wrote: Hi all, i am wanting to save a file "myFile.xls" as "myFile_Apr-08.xls". It must always be the last month to present date. Any help would be much appreciated. -- Les |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save file with last month date on end
Hi Les
This should get you started: m = MonthName(Month(Now()) - 1, True) SaveName = "MyFile_" & m & "-" & Right(Year(Now()), 2) Regards, Per "Les" skrev i meddelelsen ... Hi all, i am wanting to save a file "myFile.xls" as "myFile_Apr-08.xls". It must always be the last month to present date. Any help would be much appreciated. -- Les |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save file with last month date on end
Thanks Mike
-- Les "Mike H" wrote: Les, Try this fname = "myfile_" & DateSerial(Year(Date), Month(Date) + 1, 0) Mike "Les" wrote: Hi all, i am wanting to save a file "myFile.xls" as "myFile_Apr-08.xls". It must always be the last month to present date. Any help would be much appreciated. -- Les |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can I set a file to auto-open and save at each month begin date? | Excel Discussion (Misc queries) | |||
Recovering File Info Specifically Save Date or Print Date | Excel Discussion (Misc queries) | |||
Macro to save Excel file with date and time in the file name? | Excel Programming | |||
Automatically save report to new file name each month | Excel Programming | |||
CREATING NEW WORKBOOK FILE EVERY MONTH AND NEW WORKSHEET EVERY DATE | Excel Programming |