Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
How can I save all open excel files?
Is there a way to save all open Excel files with one command? I am working
on annual budget and have ~70 open files and I toggle back and forth so often I forget what I saved. Is there one command that will save them all at the same time? I can click on the red close-excel "X" at the top and click yes to all, but I do not want to close them. Suggestions? Thanks in advance. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
How can I save all open excel files?
You could use a macro:
Option Explicit Sub SaveThemAll() Dim wkbk As Workbook Dim okCtr As Long okCtr = 0 For Each wkbk In Application.Workbooks If wkbk.Path = "" Then 'hasn't been saved, so skip it Else If wkbk.Saved = True Then 'skip it, why bother Else On Error Resume Next wkbk.Save If Err.Number < 0 Then MsgBox "Error saving: " & wkbk.FullName _ & vbLf & Err.Number & vbLf & Err.Description Err.Clear Else Beep 'some indicator Application.StatusBar = "Saved: " & wkbk.Name & " at " & Now okCtr = okCtr + 1 End If On Error GoTo 0 End If End If Next wkbk Application.StatusBar = False MsgBox okCtr & " of " & Application.Workbooks.Count & " saved." End Sub If you're new to macros: Debra Dalgleish has some notes how to implement macros he http://www.contextures.com/xlvba01.html David McRitchie has an intro to macros: http://www.mvps.org/dmcritchie/excel/getstarted.htm Ron de Bruin's intro to macros: http://www.rondebruin.nl/code.htm (General, Regular and Standard modules all describe the same thing.) Cobaum wrote: Is there a way to save all open Excel files with one command? I am working on annual budget and have ~70 open files and I toggle back and forth so often I forget what I saved. Is there one command that will save them all at the same time? I can click on the red close-excel "X" at the top and click yes to all, but I do not want to close them. Suggestions? Thanks in advance. -- Dave Peterson |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
How can I save all open excel files?
Here's one I use to save and close all and leave Excel
Sub CLOSE_ALL() Application.ScreenUpdating = False Application.DisplayAlerts = False For Each w In Application.Workbooks w.Save Next w application.Quit End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "Cobaum" wrote in message ... Is there a way to save all open Excel files with one command? I am working on annual budget and have ~70 open files and I toggle back and forth so often I forget what I saved. Is there one command that will save them all at the same time? I can click on the red close-excel "X" at the top and click yes to all, but I do not want to close them. Suggestions? Thanks in advance. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
How can I save all open excel files?
So Excel never put in thier program? I am surprized. I would have thought
that there would have been a command... Thanks for the help. "Cobaum" wrote: Is there a way to save all open Excel files with one command? I am working on annual budget and have ~70 open files and I toggle back and forth so often I forget what I saved. Is there one command that will save them all at the same time? I can click on the red close-excel "X" at the top and click yes to all, but I do not want to close them. Suggestions? Thanks in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do I toggle between 2 open excel files and leave both open | Excel Discussion (Misc queries) | |||
How to change default Open/Files of Type to "Microsoft Excel Files | Excel Discussion (Misc queries) | |||
Can I save excel files as web connected files | Excel Discussion (Misc queries) | |||
Fix for open/save files problem | Excel Discussion (Misc queries) | |||
How do i save all open files in excel at once? | Excel Discussion (Misc queries) |