I have a macro that saves my currently open file in a specific location and with a specific name based on certain conditions in a cell but i want the original file to be open at the same time.
My end goal is to have an open book with a load of data, copy the whole workbook (I don't know how to do this), make any changes (e.g. delete a couple of rows-I can do this) and then save as an xlsm (I have code to do this) and finally close the book. Then the only open book would be the original with all the data. I would do this multiple times based on what data is deleted (e.g data with multiple names, I would have one version for each name).
The only part I cannot do so creating a copy of my current workbook to make arrangements.
Here is my code to save the file.
Sub static_save()
Dim Location
Dim LocationStatic
Dim FName
Dim ws As Worksheet
'Save current file as xlsm
Location = Worksheets("Control Sheet").Range("B19").Value
LocationStatic = Worksheets("Control Sheet").Range("B20").Value
FName = Worksheets("Control Sheet").Range("B18").Value
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Location & FName
Thanks
Bookmarks