Intercepting the file save prompt before close?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have a auto_close routine that intercepts the file save routine but when
the routine ends I still see the file save Yes, No Cancel dialog.

sub auto_close()


end sub

How do I disable this and continue?

Thanks in advance,
-Neil
 
Possibly by setting

ThisWorkbook.Saved = True

Before Excel attempts to close the file.
 
Tom, That does not work. all that does it closes the file.

sub auto_close()
reponse=msgbox (close, yes/no)
if response = no then
'tried your suggestion but does not work
ThisWorkbook.Saved = True
else
save file as is and close
endif
end sub

any other suggestions?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top