ASKER
ASKER
ASKER
ASKER
Visual Basic is Microsoft’s event-driven programming language and integrated development environment (IDE) for its Component Object Model (COM) programming model. It is relatively easy to learn and use because of its graphical development features and BASIC heritage. It has been replaced with VB.NET, and is very similar to VBA (Visual Basic for Applications), the programming language for the Microsoft Office product line.
TRUSTED BY
Try these:
Function IsValidEmail(value As String, Optional strOut As String) As Boolean
'
Dim RE As Object, match
Set RE = CreateObject("vbscript.Reg
RE.Pattern = "[a-zA-Z0-9\._-]+@([a-zA-Z
If RE.test(value) Then
If Not IsMissing(strOut) Then
Set match = RE.Execute(value)
If match.Count Then strOut = match(0)
End If
IsValidEmail = True
Else
IsValidEmail = False
strOut = ""
End If
Set RE = Nothing
'
End Function
Function GetAddress(value As String)
Dim strOut As String
If IsValidEmail(value, strOut) Then
GetAddress = strOut
Else
GetAddress = ""
End If
End Function
HTH
Rory