Prevent save when content change?

  • Thread starter Thread starter Nick
  • Start date Start date
N

Nick

Hi,

I wuould like to know if any method can disable "save when change"
function in excel using vba. Since I do not want the pop-up when closing
the excel.

Thanks.

Nick
 
Application.DisplayAlert = False
' your save commands here
Application.DisplayAlert = True

Cheers
Nigel
 
Hi
one way: put the following in the workbook_beforeclose event:

activeworkbook.saved = true
 
Hi
then put the following in the workbook_beforesave event:

Cancel=true


BUT: all the user has to do to prevent this is disable macros. Why not
save the file as read-only (with password)
 

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