Excel 2013 Macro

[Closed]
Report
-
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
-
Holà!

I am currently using this macro created by a former coworker to create & save as, a couple dozen excel workbooks.
(This is just a section to create 1 workbook)


Range("G2").Select
ActiveSheet.Unprotect "password"
Columns("A:AC").EntireColumn.Hidden = False
Range("G2").Select
Columns("W:AB").Select
Range("W1").Activate
Selection.EntireColumn.Hidden = True
Range("G2:M2").Select
ActiveWindow.Zoom = 50
Range("U29").Select
ActiveCell.FormulaR1C1 = "303 Las Cruces"
Range("G2:M2").Select
ActiveCell.FormulaR1C1 = "303 Las Cruces"
Columns("U:U").Select
Selection.EntireColumn.Hidden = True
ActiveWindow.Zoom = 50
Range("A1").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
ChDir "T:\Accounting\Aspen Pre-Payroll\_Payroll Emails 2015"
ActiveWorkbook.CheckCompatibility = False
ActiveWorkbook.SaveAs Filename:= _
"T:\Accounting\Aspen Pre-Payroll\_Payroll Emails 2015\303 - TI Payroll & Exp Verification Report.xls" _
, FileFormat:=xlExcel8, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False


Right now it labels the excel as 303 - TI Payroll & Exp Verification Report when saving it. However I would like it to read 303 12.11.2015 - TI Payroll & Exp Verification Report. The date would always be the current date the workbook is being created and will always come AFTER the first 3 digits with a space in-between them.

Computer genius I am not though so any help someone can give for me to be able to do this would be greatly appreciated!

If you need me to post the ENTIRE macro later I can. It's just rather long since it creates so many workbooks with it.

I'm using Excel 2013 but backwards saving it as a 97-2003 if that makes a difference.

1 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
some thing like this

"T:\Accounting\Aspen Pre-Payroll\_Payroll Emails 2015\303 " & Format(Now(), "mm.dd.yyyy") & " - TI Payroll & Exp Verification Report.xls" _
, FileFormat:=xlExcel8, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False