Thread
:
Ah, I think...
View Single Post
#
1
Posted to microsoft.public.excel.programming
Don Guillett[_4_]
external usenet poster
Posts: 2,337
Ah, I think...
does this help
Sub CLOSE_ALL()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each w In Workbooks
w.Save
Next
Application.Quit
End Sub
Sub goaway()
--
Don Guillett
SalesAid Software
Granite Shoals, TX
"Arne" wrote in message
...
that precautions must be taken to close the workbook that
contains the macro is closed before the other workbooks
have been closed.
Try:
Dim wkb As Workbook
Application.DisplayAlerts = False
For Each wkb In Workbooks
If Not (wkb Is ThisWorkbook) Then
wkb.Close SaveChanges:=False
End If
Next wkb
ThisWorkbook.Close SaveChanges:=False
HTH
Reply With Quote
Don Guillett[_4_]
View Public Profile
Find all posts by Don Guillett[_4_]