View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Cancel an application exit from VBA?

If the event declaration has a parameter named 'Cancel', set that
variable to True. Otherwise you can't cancel individual events.
However, you can events from being triggered at all with

Application.EnableEvents = False

Be sure to set it back to true at the appropriate place in code.

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"helmekki"
wrote in
message
...

Hi there

How do I cancel an application exit from VBA?


--
helmekki


------------------------------------------------------------------------
helmekki's Profile:
http://www.excelforum.com/member.php...fo&userid=6939
View this thread:
http://www.excelforum.com/showthread...hreadid=479941