ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Rename file based on current date (https://www.excelbanter.com/excel-programming/328422-rename-file-based-current-date.html)

Wira

Rename file based on current date
 
Hi guys,

I want to rename excel file based on current date and i would prefer the
format as "ddmmyy". Here is part of the coding:

ActiveWorkbook.SaveAs Filename:= "C:\qadzidr\My Documents\29Apr05am.xls" _
, FileFormat:=xlNormal, Password:= _
"", WriteResPassword:="", ReadOnlyRecommended:=False, CreateBackup:= _
False

Appreciate ur help!!

Bob Phillips[_7_]

Rename file based on current date
 
ActiveWorkbook.SaveAs Filename:= "C:\qadzidr\My Documents\" &
Format(Date,"ddmmmyy") & "am.xls"

--
HTH

Bob Phillips

"wira" wrote in message
...
Hi guys,

I want to rename excel file based on current date and i would prefer the
format as "ddmmyy". Here is part of the coding:

ActiveWorkbook.SaveAs Filename:= "C:\qadzidr\My Documents\29Apr05am.xls" _
, FileFormat:=xlNormal, Password:= _
"", WriteResPassword:="", ReadOnlyRecommended:=False,

CreateBackup:= _
False

Appreciate ur help!!





All times are GMT +1. The time now is 10:08 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com