Create new workbooks using a template workbook

Closed
panama407 Posts 1 Registration date Wednesday 22 August 2018 Status Member Last seen 22 August 2018 - 22 Aug 2018 à 14:47
 Blocked Profile - 23 Aug 2018 à 17:28
Hello,

Any chance someone would know how to create a macro that would take an existing excel workbook template with data on Sheet1 and have the macro create new workbooks for each business day for the year? The name for each of the new templates would have a different name such as AGL 09.03.18.xls. Sorry if this question is too general as I am not an excel macro expert.

Thank you,

Peter
Related:

1 response

Blocked Profile
23 Aug 2018 à 17:28
Its called Save as: No macro needed.

BTW, you cannot have file name with periods in it, well you can, but good luck!

If you need a more elegant solution, try this:

Sub MacroSave()
dt = Day(Date) & Month(Date) & Year(Date)
ActiveWorkbook.SaveAs Filename:="C:\somefolder\Book" & dt & ".xls", _
FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
End Sub


Try that!