Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro, or excel program to "Close All' while in a workspace
Hello all,
I usually run a couple of workbooks in one workspace and the only way to close the workbooks within a workspace is to either: 1) Close each workbook individually 2) Holding the 'shift' key and clicking on 'file' and then clicking on 'close all'. I have been trying to record a macro to make this easier, but without any success. Can someone either let me know if there is another way to close a number of workbooks within a workspace or help me put together a macro or an excel program that will alleviate this laborious action? Cheers Carlton *** Sent via Developersdex http://www.developersdex.com *** |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro, or excel program to "Close All' while in a workspace
" usually run a couple of workbooks in one workspace " what is one workspace? this will save and close and open workbooks and then exit excel, is this what you want? Sub Close_All() 'will save all open workbooks and close excel Application.ScreenUpdating = False Application.DisplayAlerts = False For Each w In Workbooks w.Save Next Application.Quit End Sub -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "Carlton Patterson" wrote in message ... Hello all, I usually run a couple of workbooks in one workspace and the only way to close the workbooks within a workspace is to either: 1) Close each workbook individually 2) Holding the 'shift' key and clicking on 'file' and then clicking on 'close all'. I have been trying to record a macro to make this easier, but without any success. Can someone either let me know if there is another way to close a number of workbooks within a workspace or help me put together a macro or an excel program that will alleviate this laborious action? Cheers Carlton *** Sent via Developersdex http://www.developersdex.com *** |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro, or excel program to "Close All' while in a workspace
Hi Paul,
Thanks for responding to my request. However, its not quite what I want. Basically, you work within a workbook, and within each workbook you have worksheets. Now, I usually work with two different workbooks. I then save both workbooks in a workspace so that when I open up the workspace both of my workbooks appear at once. I hope that explains workspaces, adequately. Now, in order to close the workspace in one shot without totally exiting excel I have to hit 'shift', then click on 'file' and then click on 'close all'. I would like help compiling an excel program that will let me close the workspace in one shot without totally exiting excel. The program you put together with exit me out of excel totally. Any help you can give will be greatly appreciated. Cheers Carlton *** Sent via Developersdex http://www.developersdex.com *** |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro, or excel program to "Close All' while in a workspace
Carlton, how about Gary's then, if you want excel to always save the files
put True after wb.close and uncomment display alerts -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "Carlton Patterson" wrote in message ... Hi Paul, Thanks for responding to my request. However, its not quite what I want. Basically, you work within a workbook, and within each workbook you have worksheets. Now, I usually work with two different workbooks. I then save both workbooks in a workspace so that when I open up the workspace both of my workbooks appear at once. I hope that explains workspaces, adequately. Now, in order to close the workspace in one shot without totally exiting excel I have to hit 'shift', then click on 'file' and then click on 'close all'. I would like help compiling an excel program that will let me close the workspace in one shot without totally exiting excel. The program you put together with exit me out of excel totally. Any help you can give will be greatly appreciated. Cheers Carlton *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Adding a Close Workspace option when right-clicking Excel in taskb | Setting up and Configuration of Excel | |||
Excel program close suddenly | Excel Discussion (Misc queries) | |||
Is there a way to unload the loaded XLL file in Excel? Hi all, I amdebugging XLL link library using Visual C++. Everytime I rebuild the XLL, Ihave to close the whole Excel program and relaunch the Excel program again,and then load in the newly gene | Excel Discussion (Misc queries) | |||
Excel 2003 not responding to "X" to close program | Excel Discussion (Misc queries) | |||
Excel slow to close file/program | Excel Discussion (Misc queries) |