'sets the flag that the workbook is saved, doesn't save it
ThisWorkbook.Saved = True
Application.Quit
absolutely not , the file xlsm contains macro when I run the macro should not close the file . just keep openAre you just trying to close the file and leave Excel open? If so, the code you have works for me.