vba - I get a dead blank window after closing excel 2016? -


my codes run fine until closing workbook. here's code:

.....     olmail         .subject = "hi " & activeworkbook.name         .body = strsubject         .attachments.add activeworkbook.path & "\" & activeworkbook.name         .display     end     set olapp = nothing     set olnamespace = nothing     set olmail = nothing     application.screenupdating = true      activeworkbook.save     activeworkbook.saved = true     doevents     activeworkbook.close <<<<===== see blank excel window here!     application.enableevents = true     exit sub 

i'm not sure if bug excel 2016 or not whole window of excel, missing ribbon:

enter image description here

it's because close workbook , not application.

use application.quit


Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -