ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Effects of certain code on file(s) being closed (https://www.excelbanter.com/excel-programming/399098-effects-certain-code-file-s-being-closed.html)

XP

Effects of certain code on file(s) being closed
 
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.

Dave Peterson

Effects of certain code on file(s) being closed
 
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.

XP wrote:

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.


--

Dave Peterson


All times are GMT +1. The time now is 07:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com