Sub CloseAll()
Workbooks.Close
End Sub
Sub CloseAllButActive()
For i = 1 To Workbooks.Count
If (Workbooks(i).Name <> ActiveWorkbook.Name) Then
Workbooks(i).Close False ' False to not save
End If
Next i
End Sub
Public Sub CloseAllOtherBooks()
Dim wb As Workbook
If MsgBox("Close All Other Workbooks Without Saving Changes?", _
vbCritical + vbYesNo) = vbYes Then
For Each wb In Workbooks
If Not wb.Name = Me.Name Then
wb.Close False
End If
Next
End If
End Sub