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
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
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
Jim,
Try something like
Application.EnableEvents = False
WB1.Close
Application.EnableEvents = True
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"JK" <[email protected]> wrote in message
news:[email protected]...
> 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
>
>
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks