Any idea how to stop a file from closing when a before close event has been met. here is what I have so far:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If ActiveSheet.Cells(85, 12).Value > 0 And ActiveSheet.Cells(85, 9).Value < 1 Then
MsgBox "Enter a Travel Order Number"
Else: Close
End If
End Sub
After the MsgBox has been clicked I want the file not to close and return to the worksheet.
Any help would be apreciated.
Dale
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If ActiveSheet.Cells(85, 12).Value > 0 And ActiveSheet.Cells(85, 9).Value < 1 Then
MsgBox "Enter a Travel Order Number"
Else: Close
End If
End Sub
After the MsgBox has been clicked I want the file not to close and return to the worksheet.
Any help would be apreciated.
Dale