ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Changing The Changed State (https://www.excelbanter.com/excel-programming/298878-changing-changed-state.html)

GJones

Changing The Changed State
 
Hi;

I was wondering if anyone has a code snippet to show me
how to set the changed state for a workbook to be
changed. I have several routines that create changes to
the workbook but when the user X's out it does not ask
them if they want to save the changes.

Thanks,

Greg

Frank Kabel

Changing The Changed State
 
Hi Greg
normally Excel takes care of this. Do you have any code in the
workbook_BeforeSave event?

--
Regards
Frank Kabel
Frankfurt, Germany


Gjones wrote:
Hi;

I was wondering if anyone has a code snippet to show me
how to set the changed state for a workbook to be
changed. I have several routines that create changes to
the workbook but when the user X's out it does not ask
them if they want to save the changes.

Thanks,

Greg



iwrk4dedpr

Changing The Changed State
 
In the BeforeClose event for the workbook object you can place th
following Me.saved = true


Elsewhere you can put workbooks("NameHere").saved = tru

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 03:33 PM.

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