File Name as Date and Time

T

Tasar

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.
 
D

Dave Peterson

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.
 
Top