I'm trying to validate an entered email address in a text Box.
The VBA code i'm using is:
If (Not IsNull(EdEmail.Value)) And ((Not EdEmail.Value Like "?*@?*.*?") Or (Not EdEmail.Value Like "*?.?*@?*.*?") Or (EdEmail.Value Like "*[!0-9a-z@._+-;, ]*")) Then
msgbox "Invalid email"
end If
.....
No matter what I enter it gives the error.
Can anyone help?
Thanks.