AawwYeahh
11-02-2020, 07:15 AM
Ok I am stymied here, I have successfully written the vba to save to determined folder and with the correct filename, BUT cannot for the life of me keep the workbook open once it is created. (Once formula runs, template closes, and newly created workbook does not open. here is example code:
Sub FileNameAsCellContent()
Dim FileName As String
Dim Path As String
Application.DisplayAlerts = False
Path = "C:\Users\ay\South\PENDING"
FileName = Range("B17").Value & ".xlsm"
ActiveWorkbook.SaveAs Path & FileName, xlOpenXMLWorkbookMacroEnabled
Application.DisplayAlerts = True
ActiveWorkbook.Close
End Sub
Any suggestions?
Ideally I would like the workbook to be saved as correct name and continue to stay open (or opened) so that additional steps may be performed on individual workbook (not template)
Thank you in advance for any insight!
Sub FileNameAsCellContent()
Dim FileName As String
Dim Path As String
Application.DisplayAlerts = False
Path = "C:\Users\ay\South\PENDING"
FileName = Range("B17").Value & ".xlsm"
ActiveWorkbook.SaveAs Path & FileName, xlOpenXMLWorkbookMacroEnabled
Application.DisplayAlerts = True
ActiveWorkbook.Close
End Sub
Any suggestions?
Ideally I would like the workbook to be saved as correct name and continue to stay open (or opened) so that additional steps may be performed on individual workbook (not template)
Thank you in advance for any insight!