Thread: Stop Event
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default 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?