Closing Excel Application using VBA

前端 未结 8 1222
忘了有多久
忘了有多久 2020-11-29 04:44

I have used the following without success. The active workbook closes, indeed, but the excel window remains open.

Application.ActiveWindow.Close SaveChanges:         


        
8条回答
  •  孤城傲影
    2020-11-29 05:06

    Sub TestSave()
    Application.Quit
    ThisWorkBook.Close SaveChanges = False
    End Sub
    

    This seems to work for me, Even though looks like am quitting app before saving, but it saves...

提交回复
热议问题