Hello there, can you please tell me whats wrong with case VbNo?
its suposed to close the workboo when user select "No"
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Cancel = True
Application.DisplayAlerts = False
Dim exit1 As Integer
exit1 = MsgBox(" Would you like to save changes?", vbYesNoCancel, "Exit?")
Select Case exit1
Case vbYes
Call SaveAsNameInCells
Exit Sub
Case vbCancel
Cancel = True
Application.EnableEvents = True
Exit Sub
Case vbNo
ThisWorkbook.Close savechanges:=False
End Select
End Sub
-Thank's in advance
its suposed to close the workboo when user select "No"
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Cancel = True
Application.DisplayAlerts = False
Dim exit1 As Integer
exit1 = MsgBox(" Would you like to save changes?", vbYesNoCancel, "Exit?")
Select Case exit1
Case vbYes
Call SaveAsNameInCells
Exit Sub
Case vbCancel
Cancel = True
Application.EnableEvents = True
Exit Sub
Case vbNo
ThisWorkbook.Close savechanges:=False
End Select
End Sub
-Thank's in advance
