Hi
I have an excel form for reporting the result of a test. I used a formula to determine if the test is PASS or FAIL.
I want to use a VBA code to warn the user on exit if the result is Fail and asked to review if necessary.
I tried some codes(like below) but did not work and also data validation is not working too!
[VBA]Private Sub Workbook_BeforeClose(Cancel As Boolean)
If ThisWorkbook.Sheets("CSG 130").Range("I$64").Value2 <> "PASS" Then
MsgBox "Analysis Outcome is Failed!!!!"
Cancel = True
End If
End Sub[/VBA]
Any suggestion, please?