ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   SaveAs Filename Help (https://www.excelbanter.com/excel-programming/283143-saveas-filename-help.html)

Ron de Bruin

SaveAs Filename Help
 
I'm trying to create a sub rountine that will save the active woorbook with
the current date and time.


Sub test()
ActiveWorkbook.SaveAs Format(Now, "dd-mm-yy h-mm-ss") & ".xls"
End Sub


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Ed" wrote in message ...
I'm trying to create a sub rountine that will save the active woorbook with
the current date and time.
E2 has the NOW() function. I copied the code from another woorbook and tried
to modify it and now I'm
just lost.
What I want to do is save the routine in a woorbook called FTR.xls, but want
to execute the procedure on different
woorbooks that I open.


Sub Save_File ()
ActiveWorkbook.SaveAs Filename:=Sheets("Sheet5").Range("E2").Value &
".xls"

End Sub

T.I.A.
Ed







Ed[_14_]

SaveAs Filename Help
 
I'm trying to create a sub rountine that will save the active woorbook with
the current date and time.
E2 has the NOW() function. I copied the code from another woorbook and tried
to modify it and now I'm
just lost.
What I want to do is save the routine in a woorbook called FTR.xls, but want
to execute the procedure on different
woorbooks that I open.


Sub Save_File ()
ActiveWorkbook.SaveAs Filename:=Sheets("Sheet5").Range("E2").Value &
".xls"

End Sub

T.I.A.
Ed





Ed[_14_]

SaveAs Filename Help
 
Thanks




"Ron de Bruin" wrote in message
...
I'm trying to create a sub rountine that will save the active woorbook

with
the current date and time.


Sub test()
ActiveWorkbook.SaveAs Format(Now, "dd-mm-yy h-mm-ss") & ".xls"
End Sub


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Ed" wrote in message

...
I'm trying to create a sub rountine that will save the active woorbook

with
the current date and time.
E2 has the NOW() function. I copied the code from another woorbook and

tried
to modify it and now I'm
just lost.
What I want to do is save the routine in a woorbook called FTR.xls, but

want
to execute the procedure on different
woorbooks that I open.


Sub Save_File ()
ActiveWorkbook.SaveAs Filename:=Sheets("Sheet5").Range("E2").Value &
".xls"

End Sub

T.I.A.
Ed










All times are GMT +1. The time now is 11:17 AM.

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