Closing Excel Application using VBA

前端 未结 8 1167
忘了有多久
忘了有多久 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:07

    I tried a certain sequence that seems to work as you can see below:

    ThisWorkbook.Saved = True
    Application.Quit
    Application.ActiveWindow.Close SaveChanges:=False
    ActiveWorkbook.Close SaveChanges:=False
    

提交回复
热议问题