C
Chris Gorham
Hi..
I'm attempting to write some code that will simply prevent
a workbook from saving changes and close (without any
display alerts) when the "X" is clicked.
Tried this:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.Close SaveChanges:=False
End Sub
however this results in Excel crashing...you can't select
a cell in the underlying workook that becomes the active
once this file closes. If you attempt to select another
sheet in it - crash..!!
Any help appreciated - I run Excel 2000
Rgds
Chris
I'm attempting to write some code that will simply prevent
a workbook from saving changes and close (without any
display alerts) when the "X" is clicked.
Tried this:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.Close SaveChanges:=False
End Sub
however this results in Excel crashing...you can't select
a cell in the underlying workook that becomes the active
once this file closes. If you attempt to select another
sheet in it - crash..!!
Any help appreciated - I run Excel 2000
Rgds
Chris