G
Guest
I keep getting "Compile Error: Label not defined" for this function with "On
Error GoTo HandleError" highlighted. But I cannot find any syntax problems.
I'm probably missing something obvious...
Private Function saveRow() As Boolean
On Error GoTo HandleError
If Form.Dirty Then
Form.Dirty = False
End If
Exit_Save:
saveRow = True
End Function
HandleError:
MsgBox "The data you have entered does not meet the requirements for
this form. Please finish entering the data, or press ESC to undo your
entry.", vbExclamation
saveRow = False
End Function
Error GoTo HandleError" highlighted. But I cannot find any syntax problems.
I'm probably missing something obvious...
Private Function saveRow() As Boolean
On Error GoTo HandleError
If Form.Dirty Then
Form.Dirty = False
End If
Exit_Save:
saveRow = True
End Function
HandleError:
MsgBox "The data you have entered does not meet the requirements for
this form. Please finish entering the data, or press ESC to undo your
entry.", vbExclamation
saveRow = False
End Function