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.

Signature
Les
Mike H - 29 May 2008 12:18 GMT
Les,
Try this
fname = "myfile_" & DateSerial(Year(Date), Month(Date) + 1, 0)
Mike
> 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 - 29 May 2008 12:28 GMT
Thanks Mike

Signature
Les
> Les,
>
[quoted text clipped - 9 lines]
> >
> > Any help would be much appreciated.
Per Jessen - 29 May 2008 12:24 GMT
Hi Les
This should get you started:
m = MonthName(Month(Now()) - 1, True)
SaveName = "MyFile_" & m & "-" & Right(Year(Now()), 2)
Regards,
Per
> 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.