Bypass workbook open or close events

  • Thread starter Thread starter rob nobel
  • Start date Start date
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
 
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
 
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
 

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