Sub saveWorkbook() For I = 1 To 3 If Workbooks(I).Saved = True Then Workbooks(I).Close Next I End Sub