Hi!
Here is a function that I wrote myself to check for a valid email. Although it is not complete but it checks for the most common things such as:
-correct length
-contains '@'
-position of the '@'
-contains a '.' after the '@'
-contains atleast two characters after the '@' and the '.'
The function takes an email as a parameter and returns true or false
Public Function checkEmail(e As String) As Boolean
Dim email_2 As String
Dim pos1 As String
Dim tmp As Variant
Dim tmp2 As Variant
Dim tmp3 As Variant
Dim str As Integer
email_2 = e
pos1 = Mid(email_2, 1, 1)
If (Len(email_2) < 6) Then
MsgBox ("Email has an invalid format"

ElseIf (pos1 = "@"

Then
MsgBox ("Email has an invalid format"

Else
tmp = InStr(2, email_2, "@"

If (tmp = 0) Then
MsgBox ("Email has an invalid format"

Else
tmp = tmp + 2
tmp2 = InStr(tmp, email_2, "."

If (tmp2 = 0) Then
MsgBox ("Email has an invalid format"

Else
tmp2 = tmp2 + 1
tmp3 = Mid(email_2, tmp2, 1)
If (tmp3 <> ""

Then
checkEmail = True
Else
MsgBox ("Email has an invalid format"

End If
End If
End If
End If
End Function
Code to access the above function
Private Sub checkEmail()
dim str as string
str = "xxx@xx.xxx"
if (checkEmail(str)) then
do something...
end if
End Sub
Have fun
M.