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:
it's because close workbook , not application.
use application.quit

Comments
Post a Comment