View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Is it possible to prevent WB_BeforeClose with VBA?

You can tell excel to stop monitoring events.

application.enableevents = false
wb1.close savechanges:=true 'false
application.enableevents = true



JK wrote:

When opening and then closing WB1 from WB2 I don't want the
Workbook_BeforeClose macros to execute in WB1. Holding down the shift will
manually do this, but is there a way with VBA? Thank you.

Jim Kobzeff


--

Dave Peterson