View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_7_] Bob Phillips[_7_] is offline
external usenet poster
 
Posts: 1,120
Default 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!!