I understand that this might seem a bit of an unusual one to request, but I would really appreciate some help in trying to achieve this.
I have the following so far, which doesn't quite close everything. The workbook that holds the sub exits and closes, but other workbooks that have been used, that have the default Book1, Book2, Book3 etc. and still contain data that have not been saved, still remain open.
Private Sub cmdExit_Click()
For Each wb In Workbooks
If wb.Name <> ThisWorkbook.Name Then
wb.Close SaveChanges:=False
End If
Next
For Each wb In Workbooks
If Not wb.FullName = ThisWorkbook.FullName Then wb.Close False
Next
ThisWorkbook.Saved = True
Application.Quit
End Sub
Many thanks!
Steve