ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   File Name as Date and Time (https://www.excelbanter.com/excel-discussion-misc-queries/63956-file-name-date-time.html)

Tasar

File Name as Date and Time
 

Im racking my brain here trying to figure out a way to build a macro
that will save a spreadsheet as a date and time. Anyone have a
solution?

Basicly I want to have a macro thats move the current data out of one
wook sheet to another wook book and save it. The file name will have to
change everytime this happens. Perferably the date and time. Its this
unique file name that Im stuck on.


--
Tasar
------------------------------------------------------------------------
Tasar's Profile: http://www.excelforum.com/member.php...o&userid=30272
View this thread: http://www.excelforum.com/showthread...hreadid=499401


Dave Peterson

File Name as Date and Time
 
Activeworkbook.saveas _
filename:="C:\test\" & format(now,"yyyy_mm_dd__hh_mm_ss") & ".xls"

You don't need to get the date/time out of a worksheet.



Tasar wrote:

Im racking my brain here trying to figure out a way to build a macro
that will save a spreadsheet as a date and time. Anyone have a
solution?

Basicly I want to have a macro thats move the current data out of one
wook sheet to another wook book and save it. The file name will have to
change everytime this happens. Perferably the date and time. Its this
unique file name that Im stuck on.

--
Tasar
------------------------------------------------------------------------
Tasar's Profile: http://www.excelforum.com/member.php...o&userid=30272
View this thread: http://www.excelforum.com/showthread...hreadid=499401


--

Dave Peterson


All times are GMT +1. The time now is 08:40 PM.

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