View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default Closing files by a macro

I stand corrected. tnx Chs.

"Die_Another_Day" wrote:

JLG, The syntax for Close is:
ActiveWorkbook.Close SaveChanges:=True
So the " True" takes care of the save.

Charles

JLGWhiz wrote:
You might want to throw in : ActiveWorkbook.Save : in Charles' code to save
and close.

"Die_Another_Day" wrote:

Dim wb as Workbook
For each wb in Workbooks
if not wb.name = "Personal.xls" Then
wb.Close True
End if
next

Is that what you are trying to accomplish?

Charles

kurt wrote:
Hi all


I have 20 excellworkbooks open with diferent names.

Problem is to save and close theese files as fast as possible by a
macro.

As it is now, one file has to be saved and closed before I can run the
macro again manually.
Is the a vbariable there can be used to automatic restart the macro???

anyone have an idea??


The macro is placed in Personal.xls.



regards


kurt