Use workbook_beforeclose without loosing the question "do you want to save your changes"

Tal

New Member
Joined
May 26, 2008
Messages
5
All, <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
<o:p></o:p>
I wish to update the workbook each time it's being closed, and I do it by using workbook_beforeclose, and then ThisWorkbook.Save<o:p></o:p>
<o:p></o:p>
When working like that, I'm losing the excel functionality that checks if data was changed, and if it was, asking the user if he wishes to save his changes. <o:p></o:p>
<o:p> </o:p>
Is there a way to have it both? <o:p></o:p>
<o:p> </o:p>
Thanks, <o:p></o:p>
<o:p> </o:p>
Tal<o:p></o:p>
<o:p> </o:p>
 

Some videos you may like

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

venkat1926

Well-known Member
Joined
Aug 21, 2005
Messages
4,824
Only if you put a statemnt in the beginning
application.displayalerts=false
and at the end
application.displayalerts=true
it will not alert you.
probably in one of the macros the second statement has not inadvertenty added


try this.

in your code put a statemen in the beginning
application.displayalaerts=true

and see whether it helps
 

Watch MrExcel Video

Forum statistics

Threads
1,099,770
Messages
5,470,680
Members
406,717
Latest member
Harsha Maskara

This Week's Hot Topics

Top