Try this code
Sub CloseWorkbooks()
Dim WB As Workbook
For Each WB In Application.Workbooks
If WB.Name < "A.xls" Then
If WB.Name = "D.xls" Then
WB.Close SaveChanges:=True
Else
WB.Close SaveChanges:=False
End If
End If
Next WB
End Sub
ChrisP wrote:
Thanks! One more question, workbooks B & C I don't want to save but D I do.
How would I write that?
Thanks again!
Chris
Hi Chris
[quoted text clipped - 27 lines]
Thanks,
Chris
--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200808/1