Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default close work book via macro

How do you suppress warnings when closing workbook
via macro i.e. do you want to save changes yes or no

thanks in anticipation


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default close work book via macro

Application.DisplayAlerts = False
' your code
Application.DisplayAlerts = True

Regards

Trevor


"Sunil Patel" wrote in message
...
How do you suppress warnings when closing workbook
via macro i.e. do you want to save changes yes or no

thanks in anticipation




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default close work book via macro

Hi Sunil

ActiveWorkbook.Close SaveChanges:=False

or

ActiveWorkbook.Close SaveChanges:=true


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Sunil Patel" wrote in message ...
How do you suppress warnings when closing workbook
via macro i.e. do you want to save changes yes or no

thanks in anticipation




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default close work book via macro

Workbooks("Name").Close SaveChanges:=True
or
Workbooks("Name").Close SaveChanges:=False


or

Application.DisplayAlerts = False
Workbooks("Name").Close
Application.DisplayAlerts = Tru

--
Message posted from http://www.ExcelForum.com

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
Macro shared work book Brian Excel Discussion (Misc queries) 2 June 26th 08 12:13 PM
macro for work book Daniel Charts and Charting in Excel 1 August 12th 07 12:04 AM
I was messing arround with the VBA and now I get the macro warning when I open the work book but when... Marc New Users to Excel 2 June 6th 05 08:08 AM
getting same save-on-close macro to work from different networklocations buczacz Excel Programming 0 September 12th 03 11:40 PM
getting same save-on-close macro to work from different networklocations buczacz Excel Programming 0 September 9th 03 05:48 AM


All times are GMT +1. The time now is 08:19 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"