Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default How do I temporarily turn off messages in Excel

How do I temporarily turn off messages in Excel, i.e. "Do you want to save
changes?". I'm running a macro that opens other workbooks and copies data to
my current file and then closes the other workbooks. I need to turn off
warning messages, and then turn them back on at the end of the macro.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default How do I temporarily turn off messages in Excel

Hi,

1.
When you close the other books, use:
Workbooks("my other book").Close False
The False option explicately tells not to save, therefore no message appears.

2. For most xl messages
application.DisplayAlerts=False 'turn messaging off
'...code
application.DisplayAlerts=true
--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"jtm3001" wrote:

How do I temporarily turn off messages in Excel, i.e. "Do you want to save
changes?". I'm running a macro that opens other workbooks and copies data to
my current file and then closes the other workbooks. I need to turn off
warning messages, and then turn them back on at the end of the macro.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default How do I temporarily turn off messages in Excel

Application.DisplayAlerts = False

do something

Application.DisplayAlerts = True

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default How do I temporarily turn off messages in Excel

Thanks, the Workbook.Close False worked great in this instance, and I'm sure
I will be using the Dispaly Alerts = False/True in the future.

Thanks again!

"sebastienm" wrote:

Hi,

1.
When you close the other books, use:
Workbooks("my other book").Close False
The False option explicately tells not to save, therefore no message appears.

2. For most xl messages
application.DisplayAlerts=False 'turn messaging off
'...code
application.DisplayAlerts=true
--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"jtm3001" wrote:

How do I temporarily turn off messages in Excel, i.e. "Do you want to save
changes?". I'm running a macro that opens other workbooks and copies data to
my current file and then closes the other workbooks. I need to turn off
warning messages, and then turn them back on at the end of the macro.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default How do I temporarily turn off messages in Excel

Thanks!

" wrote:

Application.DisplayAlerts = False

do something

Application.DisplayAlerts = True


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Some data in Excel 2007 temporarily disappears. Why? George England Excel Discussion (Misc queries) 2 October 5th 08 03:43 PM
Possible to turn off graph refresh temporarily? [email protected] Charts and Charting in Excel 1 May 5th 07 12:59 PM
Turn off Printer Messages JNW Excel Programming 0 November 19th 05 03:55 PM
Turn off confirmation messages via VBA Tom Ogilvy Excel Programming 0 April 13th 05 06:45 PM
Turn off confirmation messages via VBA Trevor Shuttleworth Excel Programming 0 April 13th 05 06:42 PM


All times are GMT +1. The time now is 05:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"