Stop Event

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
Create a non-Event macro to simply disable events. Run this macro and then
close
 
Sub Disable()
Application.EnableEvents = False
End Sub


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top