M
mohavv
I have folowing code
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If Range("G2").Value = "UNBALANCED!" Then Response = MsgBox("ATTENTION
UNBALANCED! Yes to go ahead / No to Cancel and correct.", vbYesNo)
If Rensponse = vbNo Then Exit Sub
If Response = vbYes Then
End if
End Sub
What I want to achieve is: when pressed "No" to go back to sheet, to
stop closing procedure
When pressed "Yes" close workbook
Is this possible?
Cheers,
Harold
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If Range("G2").Value = "UNBALANCED!" Then Response = MsgBox("ATTENTION
UNBALANCED! Yes to go ahead / No to Cancel and correct.", vbYesNo)
If Rensponse = vbNo Then Exit Sub
If Response = vbYes Then
End if
End Sub
What I want to achieve is: when pressed "No" to go back to sheet, to
stop closing procedure
When pressed "Yes" close workbook
Is this possible?
Cheers,
Harold