I am looking to automate a current process using VBA.
For every day of each month, I need to copy an existing Excel template into a new workbook, only changing the date in merged cells C3-D3, as well as in the name of the file.
The filename should always be similar to: "ACF_31 03 2018_XYZ".
I have so far found and adapted the code below which, when run once, creates a drop down button with the month names. It would be great to save all the files for a respective month within their own folder.
Sub RunOnce()
'Run this code once to set up the worksheet button
ActiveSheet.DropDowns.Add(0, 2, 100, 15).Name = "cbMonth"
Worksheets("Sheet1").Shapes("cbMonth").ControlFormat.List = _
Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December")
ActiveSheet.Shapes("cbMonth").ControlFormat.DropDownLines = 12
ActiveSheet.Buttons.Add(105, 2, 120, 15).Select
With Selection
.Name = "Create Folder Structure"
.OnAction = "CreateFolders"
.Characters.Text = "Create Folder Structure"
.Font.Color = RGB(0, 100, 200)
.Font.Size = 11
End With
Range("G1").Select
End Sub
Many thanks.