Thanks for your reply Ron.
The CloseOff macro I am trying to fix works fine in Excel 2003 (I need
it to work in both Excel 2003 and Excel 2007).
This is the code I have been using and when it runs in Excel 2007,
a window pops up saying Excel has stopped working, its looking for a
solution to the problem, and then , Excel is re-starting, and it restarts.
Inserting the line
ThisWorkbook.Close SaveChanges:=True
causes an error saying:
"This workbook is currently being referenced by another workbook and
cannot be closed", even after the other workbook has been closed.
'--- CLOSE NO SAVE - quit if this is the only book open
If AA.Caller = "Quit3" Then
ActiveWorkbook.Saved = True
ActiveWorkbook.Close
If Workbooks.Count < 1 Then
AA.DisplayAlerts = False
ThisWorkbook.Close SaveChanges:=True
AA.Quit
End If
Exit Sub
End If
Any other ideas would be appreciated.
Thank you
Andrew Bourke