O
ordnance1
I have the line below in a module:
Public NoSave As Boolean
In my Auto_Open routine I have:
Sub Auto_Open()
'
Events.Enable_Events
If ActiveWorkbook.ReadOnly = True Then
NoSave = True
Protection.ProtectAllSheets
Else
NoSave = False
Protection.UnProtectAllSheets
End If
Module7.StartPoint
Module6.StartTimer
End Sub
Then I in ThisWorkbook ihave the following"
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If NoSave = True Then
ThisWorkbook.Close False
End If
If NoSave = False Then
End If
End Sub
My problem is that when you click on either the Red X to close Excel or the
smaller X to close the workbook you are still prompted to save the workbook.
So it is not seeing NoSave as true, even when it was set to True in te
Auto_Open routine.
Public NoSave As Boolean
In my Auto_Open routine I have:
Sub Auto_Open()
'
Events.Enable_Events
If ActiveWorkbook.ReadOnly = True Then
NoSave = True
Protection.ProtectAllSheets
Else
NoSave = False
Protection.UnProtectAllSheets
End If
Module7.StartPoint
Module6.StartTimer
End Sub
Then I in ThisWorkbook ihave the following"
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If NoSave = True Then
ThisWorkbook.Close False
End If
If NoSave = False Then
End If
End Sub
My problem is that when you click on either the Red X to close Excel or the
smaller X to close the workbook you are still prompted to save the workbook.
So it is not seeing NoSave as true, even when it was set to True in te
Auto_Open routine.