Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Prevent save when content change?

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default Prevent save when content change?

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

Cheers
Nigel


"Nick" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Prevent save when content change?

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

activeworkbook.saved = true


--
Regards
Frank Kabel
Frankfurt, Germany


Nick wrote:
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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Prevent save when content change?

the point is i really don't user to save the file, any method?

thanks

Frank Kabel wrote:

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

activeworkbook.saved = true


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Prevent save when content change?

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)


--
Regards
Frank Kabel
Frankfurt, Germany


Nick wrote:
the point is i really don't user to save the file, any method?

thanks

Frank Kabel wrote:

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

activeworkbook.saved = true


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I restore previous content before a save? cls1990 Excel Discussion (Misc queries) 4 November 30th 09 09:05 PM
Prevent color change open/save sheet? Julie Moorehouse Excel Discussion (Misc queries) 0 July 29th 09 03:35 PM
Prevent from save if... Pietro Excel Discussion (Misc queries) 4 July 26th 08 09:40 AM
Save as using cell content in file name NickMinUK Excel Programming 1 June 15th 04 10:06 AM
Help! MsgBox and Prevent Save nrage21[_14_] Excel Programming 7 January 27th 04 09:13 PM


All times are GMT +1. The time now is 08:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"