ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Inhibit 'Save Changes' (https://www.excelbanter.com/excel-programming/394858-inhibit-save-changes.html)

kirkm[_7_]

Inhibit 'Save Changes'
 

A project I've nearly finished finally just about everything required
but when you close it Excel asks 'Do you want to save the changes you
made to....' irrespective of whether any changes have been made
or not.

Can I not show this message? Or, even better, only show it when
there have been changes?

Thanks - kirk


Ray

Inhibit 'Save Changes'
 
You can suppress that message with:
Application.DisplayAlerts = False
right before the code to Close the workbook.

I'm sure there's a way to check for changes, but I have no idea how to
code for that ...

//ray



kirkm[_7_]

Inhibit 'Save Changes'
 
On Mon, 06 Aug 2007 12:50:28 -0000, Ray wrote:

You can suppress that message with:
Application.DisplayAlerts = False
right before the code to Close the workbook.

I'm sure there's a way to check for changes, but I have no idea how to
code for that ...


Ray, I put that into

Private Sub Workbook_BeforeClose(Cancel As Boolean)

but it has no affect there and still brings up the prompt.

Was there where you meant it to go?

Thanks - Kirk


All times are GMT +1. The time now is 10:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com