December 4, 2021
I am trying to simply make a copy of an entire workbook for audit purposes. The name that will be created for the workbook is based on 2 cells on the "Main" sheet. I am not sure why this is happening as I am certain this is a simple macro. In addition I would like BOTH the Template (current workbook) and the NEW workbook to save and close, without asking for any prompts. Thanks so very much!!!!
D1 - The Name of the new Workbook
B14 - Today's date
' Save file as multiple cell references
Dim FName As String
Dim FPath As String
' New file name WITHOUT extension
FName = Range("$D$1").Value & Format(Range("$B$14").Value, "mm-dd-yyyy") & ".xlsb"
FPath = ThisWorkbook.Path & "\" & FName
ThisWorkbook.SaveCopyAs Filename:=FPath & "\" & FName
November 8, 2013