Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I made a macro on the excel and at the end of the macro I save it on a new
file. Can I put the date when I save the file as part of the file name? Here is copy the last part of the macro: ActiveWorkbook.SaveAs Filename:= _ "O:\Shared Services\Finance\2009\IC\IC Detail\IST_3_1_Update_ddmmyyyy.xls", _ FileFormat:=xlNormal, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False End Sub |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi
Try this: MyDate = Format(Date, "ddmmyyyy") ActiveWorkbook.SaveAs Filename:= _ "O:\Shared Services\Finance\2009\IC\IC Detail\IST_3_1_Update_" & MyDate & ".xls", _ FileFormat:=xlNormal, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False Regards, Per "Rinto Syah" skrev i meddelelsen ... I made a macro on the excel and at the end of the macro I save it on a new file. Can I put the date when I save the file as part of the file name? Here is copy the last part of the macro: ActiveWorkbook.SaveAs Filename:= _ "O:\Shared Services\Finance\2009\IC\IC Detail\IST_3_1_Update_ddmmyyyy.xls", _ FileFormat:=xlNormal, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False End Sub |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Like this Code: -------------------- ActiveWorkbook.SaveAs Filename:= _ "O:\Shared Services\Finance\2009\IC\IC Detail\IST_3_1_Update_" & Format(date,"ddmmyyyy") & ".xls", _ FileFormat:=xlNormal, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False End Sub -------------------- Rinto Syah;332073 Wrote: I made a macro on the excel and at the end of the macro I save it on a new file. Can I put the date when I save the file as part of the file name? Here is copy the last part of the macro: ActiveWorkbook.SaveAs Filename:= _ "O:\Shared Services\Finance\2009\IC\IC Detail\IST_3_1_Update_ddmmyyyy.xls", _ FileFormat:=xlNormal, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False End Sub -- Simon Lloyd Regards, Simon Lloyd 'The Code Cage' (http://www.thecodecage.com) ------------------------------------------------------------------------ Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=92811 |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Use Format(Date,) as below.......Please modify the path...
strFileName = "c:\Update_" & Format(Date, "ddmmyyyy") & ".xls" ActiveWorkbook.SaveAs Filename:=strFileName, _ FileFormat:=xlNormal, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False -- If this post helps click Yes --------------- Jacob Skaria "Rinto Syah" wrote: I made a macro on the excel and at the end of the macro I save it on a new file. Can I put the date when I save the file as part of the file name? Here is copy the last part of the macro: ActiveWorkbook.SaveAs Filename:= _ "O:\Shared Services\Finance\2009\IC\IC Detail\IST_3_1_Update_ddmmyyyy.xls", _ FileFormat:=xlNormal, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False End Sub |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Wow, this helps. Thanks Jacob...
"Jacob Skaria" wrote: Use Format(Date,) as below.......Please modify the path... strFileName = "c:\Update_" & Format(Date, "ddmmyyyy") & ".xls" ActiveWorkbook.SaveAs Filename:=strFileName, _ FileFormat:=xlNormal, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False -- If this post helps click Yes --------------- Jacob Skaria "Rinto Syah" wrote: I made a macro on the excel and at the end of the macro I save it on a new file. Can I put the date when I save the file as part of the file name? Here is copy the last part of the macro: ActiveWorkbook.SaveAs Filename:= _ "O:\Shared Services\Finance\2009\IC\IC Detail\IST_3_1_Update_ddmmyyyy.xls", _ FileFormat:=xlNormal, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Save file with todays date ref#11235 | Excel Worksheet Functions | |||
Recovering File Info Specifically Save Date or Print Date | Excel Discussion (Misc queries) | |||
Saveing workbook to a file as todays date daily | Excel Worksheet Functions | |||
When I open my past invoice it keeps changing date to todays date | Excel Worksheet Functions | |||
Automatic Populate Todays Date in Cell when File is Saved. | Excel Discussion (Misc queries) |