FYI, all....
Since you only really need to "do" something specific if one answer is given, you can slim that down to one command:
![]()
Sub CountWorkbooks() If MsgBox("More that one workbook open." & vbLf & "Workbooks Open = " & Windows.Count _ & vbLf & vbLf & "Do you wish to abort?", vbYesNo + vbCritical) = vbYes Then Exit Sub End Sub
Bookmarks