benniesanders
Programmer
Greetings, I'm not very familiar with VBA, but I have a script I use in ASP to validate email addresses entered from a form. I need something like this for an Excel userform that will verify the format of an email address being entered and I don't know where to start:
Any help or thoughts would be appreciated. Many thanks in advance.
Code:
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(myForm.email.value)){
return (true)
}
alert("Invalid E-mail Address! Please re-enter.")
myForm.email.focus();
return (false)
}