I have the following code that closes my file but leaves the active excel window open.
What changes can i make that will exit excel totally.
- Code: Select all
Sub Save_File()
Application.DisplayAlerts = False
Sheets(6).Visible = False
Dim Path As String
Dim FName1 As String
Dim FName2 As String
Path = "C:\Users\Steven\Desktop\"
FName1 = Range("C3")
FName2 = Range("G3")
ActiveWorkbook.SaveAs Filename:=Path & FName1 & "-" & FName2 & ".xlsx", FileFormat:=xlOpenXMLWorkbook
ActiveWorkbook.Close
Application.DisplayAlerts = True
Application.Quit
ActiveWindow.Close
End Sub
Thank you in advance for your input.