Excel: Macro for automatically saving filename with date
Posted by TJ on Wednesday August 29, 2007 @ 10:04 AM
[Tags: excel, hints, internet]
I use the following macro to save my timesheet using the filename and path in cell "A1"(ie:C:datafilename.xls).
You can also include today's date using concatenate by including the following in Cell A1
[Tags: excel, hints, internet]
You can also include today's date using concatenate by including the following in Cell A1
=CONCATENATE("c:datafilename_",MONTH(NOW()),"-",DAY(NOW()),"-",YEAR(NOW()),".xls")Of course you can replace cell A1 in the following code with any cell you want as long as it contains a valid filename and path.
Sub
savefile()
' SaveFile Macro
' Macro recorded 4/16/2007 by tmiller of tjshome.com
'save a copy of current spreadheet using filename in cell 'TimeFile'
TimeFile = Range("A1").Value
ActiveWorkbook.SaveAs Filename:=TimeFile, FileFormat:= _
xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False _, CreateBackup:=False
End Sub
- Related Articles:
- My timesheet
- Too Many Cell Formats in Excel (Resolved)
- Excel: Macro to automatically print individual statements to pdf
Reader Comments (Page 1 of 1)
TJ
Tuesday November 29, 2011 @ 01:11 AM
Tuesday November 29, 2011 @ 01:11 AM
You need to be more clear with your comments as I have no idea what you are talking about. What pop up are you talking about?
Zoedtdt
Friday October 28, 2016 @ 01:52 AM
Friday October 28, 2016 @ 01:52 AM
Try the best excel macroto pdf filename online directly and easily with high quality on tagpdf.com page http://www.tagpdf.com/online/convert-excel-to-pdf/.
Comments with offensive language will be automatically deleted within 24 hours.
Sunday November 27, 2011 @ 01:00 AM
I can't read the information because of the popup blocking the data.