Prevent save when content change?

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
 
N

Nigel

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

Cheers
Nigel
 
F

Frank Kabel

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

activeworkbook.saved = true
 
F

Frank Kabel

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)
 
Top