Effects of certain code on file(s) being closed

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Using Office 2003 and Window XP;

If the following are set in a file as it closes:

Application.DisplayAlerts = False
Application.EnableEvents = False

1. Will this affect the saved file in any way the next time it is opened?
2. Will it affect any other currently open files in the same instance?

Thanks much for your assistance.
 
These are application settings. They're not stored with any workbook.

The .displayalerts will stay false until you change it or the code ends.
(Although, I've always toggled it back to True when I wanted it true.)

The .enableevents setting will stay off (or on) until you change it (or close
the excel application and reopen it).

So the .displayalerts =false probably won't have any effect on any other
workbook.

But the .enableevents=false would stop any event from firing in any workbook
that's currently opened (or even opened later). This can be a useful setting --
if that's what you really want.
 

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