Stop Event
I have written a workbook_beforeclose procedure that checks if data had been
entered into a cell. At times, I do not want it to run when I close the workbook. So I create a button with a simple code of "Application.Quit", hoping that it would bypass the workbook_beforeclose. But it does not work. Can anyone tell me how to by workbook_beforeclose procedure when I close the workbook? -- Thanks! |
Stop Event
Create a non-Event macro to simply disable events. Run this macro and then
close -- Gary's Student gsnu200706 "Daviv" wrote: I have written a workbook_beforeclose procedure that checks if data had been entered into a cell. At times, I do not want it to run when I close the workbook. So I create a button with a simple code of "Application.Quit", hoping that it would bypass the workbook_beforeclose. But it does not work. Can anyone tell me how to by workbook_beforeclose procedure when I close the workbook? -- Thanks! |
Stop Event
Sub Disable()
Application.EnableEvents = False End Sub Gord Dibben MS Excel MVP On Thu, 15 Feb 2007 10:52:20 -0800, Daviv wrote: I have written a workbook_beforeclose procedure that checks if data had been entered into a cell. At times, I do not want it to run when I close the workbook. So I create a button with a simple code of "Application.Quit", hoping that it would bypass the workbook_beforeclose. But it does not work. Can anyone tell me how to by workbook_beforeclose procedure when I close the workbook? |
All times are GMT +1. The time now is 09:16 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com