Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Close all workbooks and keep excel running

Is there a way to close all workbooks without exiting excel? I have found
where you can exit excel and it will close all workbooks. I have a scenario
where it is desirable to close all open workbooks and keep excel running.

Anyone know of a way of doing this without closing each workbook individually?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 208
Default Close all workbooks and keep excel running

You can use this macro:
Sub Close_All_Open_Workbooks()
Dim I

For I = 1 To Application.Workbooks.Count
Application.Workbooks(I).Close
Next

End Sub


On Jun 25, 8:49*am, Scott Hutslar <Scott
wrote:
Is there a way to close all workbooks without exiting excel? *I have found
where you can exit excel and it will close all workbooks. *I have a scenario
where it is desirable to close all open workbooks and keep excel running. *

Anyone know of a way of doing this without closing each workbook individually?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Close all workbooks and keep excel running

Thanks for the reply Tim. This is a good way of doing this if we create a
global macro for all users to execute. Is there a way provided by Excel for
an end user to do this? I guess I am looking for a Ribbon path for doing
this.

"Tim879" wrote:

You can use this macro:
Sub Close_All_Open_Workbooks()
Dim I

For I = 1 To Application.Workbooks.Count
Application.Workbooks(I).Close
Next

End Sub


On Jun 25, 8:49 am, Scott Hutslar <Scott
wrote:
Is there a way to close all workbooks without exiting excel? I have found
where you can exit excel and it will close all workbooks. I have a scenario
where it is desirable to close all open workbooks and keep excel running.

Anyone know of a way of doing this without closing each workbook individually?



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 154
Default Close all workbooks and keep excel running

Scott,

Does FileClose not work for this purpose? It will close all open Workbooks
and leave the Excel application open.

--
--Thomas [PBD]
Working hard to make working easy.


"Scott Hutslar" wrote:

Thanks for the reply Tim. This is a good way of doing this if we create a
global macro for all users to execute. Is there a way provided by Excel for
an end user to do this? I guess I am looking for a Ribbon path for doing
this.

"Tim879" wrote:

You can use this macro:
Sub Close_All_Open_Workbooks()
Dim I

For I = 1 To Application.Workbooks.Count
Application.Workbooks(I).Close
Next

End Sub


On Jun 25, 8:49 am, Scott Hutslar <Scott
wrote:
Is there a way to close all workbooks without exiting excel? I have found
where you can exit excel and it will close all workbooks. I have a scenario
where it is desirable to close all open workbooks and keep excel running.

Anyone know of a way of doing this without closing each workbook individually?



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Close all workbooks and keep excel running

Thanks Thomas. Close just closes the current (active) workbook. But your
suggestion prompted me to customize my tool bar and add a "Close All" button.
This can be found in the commands "Not in the Ribbon".

Thanks everyone for your help!

"Thomas [PBD]" wrote:

Scott,

Does FileClose not work for this purpose? It will close all open Workbooks
and leave the Excel application open.

--
--Thomas [PBD]
Working hard to make working easy.


"Scott Hutslar" wrote:

Thanks for the reply Tim. This is a good way of doing this if we create a
global macro for all users to execute. Is there a way provided by Excel for
an end user to do this? I guess I am looking for a Ribbon path for doing
this.

"Tim879" wrote:

You can use this macro:
Sub Close_All_Open_Workbooks()
Dim I

For I = 1 To Application.Workbooks.Count
Application.Workbooks(I).Close
Next

End Sub


On Jun 25, 8:49 am, Scott Hutslar <Scott
wrote:
Is there a way to close all workbooks without exiting excel? I have found
where you can exit excel and it will close all workbooks. I have a scenario
where it is desirable to close all open workbooks and keep excel running.

Anyone know of a way of doing this without closing each workbook individually?




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Close all workbooks and keep excel running

In earlier versions CTRL + w closed all workbooks but user is asked about
saving.


Gord Dibben MS Excel MVP

On Wed, 25 Jun 2008 06:10:01 -0700, Scott Hutslar
wrote:

Thanks for the reply Tim. This is a good way of doing this if we create a
global macro for all users to execute. Is there a way provided by Excel for
an end user to do this? I guess I am looking for a Ribbon path for doing
this.

"Tim879" wrote:

You can use this macro:
Sub Close_All_Open_Workbooks()
Dim I

For I = 1 To Application.Workbooks.Count
Application.Workbooks(I).Close
Next

End Sub


On Jun 25, 8:49 am, Scott Hutslar <Scott
wrote:
Is there a way to close all workbooks without exiting excel? I have found
where you can exit excel and it will close all workbooks. I have a scenario
where it is desirable to close all open workbooks and keep excel running.

Anyone know of a way of doing this without closing each workbook individually?




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
How do I close multiple Excel '07 workbooks at the same time? KYJ Excel Discussion (Misc queries) 1 April 19th 07 04:34 PM
why do all excel worksheets/workbooks close when I close one? Penny Excel Discussion (Misc queries) 1 November 29th 06 03:49 AM
close workbooks without closing excel ? Clute Excel Discussion (Misc queries) 2 August 5th 06 09:50 PM
Is there a way to force Excel to close workbooks independently? Cam Excel Discussion (Misc queries) 4 February 2nd 06 07:43 PM
Why does Excel close all workbooks? JVernon Setting up and Configuration of Excel 1 July 5th 05 10:38 PM


All times are GMT +1. The time now is 08:09 PM.

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"