Bypass workbook open or close events

R

rob nobel

Is it possible to write into code something that would bypass The Workbook
Open and Close events altogether or even certain lines of code therein?
Could someone provide an example to start me off please?
Rob
 
J

John Wilson

rob,

If you're opening a workbook via code, then
Application.EnableEvents = False
before opening the workbook, will stop the "Events"
(of which, Workbook_Open is an event), from firing.
This would keep "Events" disabled (including the
Workbook_Close) until you re-enabled them with
Application.EnableEvents = True

John
 
R

rob nobel

Thanks for that John. I did know of those lines but not quite sure how to
use them in my particular application. But will experiment.
Rob
 
Top