Search Tools Links Login

Total Email Validation

Validates email addresses. Makes sure the email addresses with IP addresses are not private network addresses. Allows multiple sub-domain levels. verifies characters within domain names. only allows standard length 26 characters for each domain name level, except the top (3 max)

Original Author: Lewis E. Moten III


asString - Email address to be validated.


Boolean (true/false) value indicating if the string presented was a valid email address.

API Declarations

Copyright (c) 1999, Lewis Moten. All rights reserved.


Option Explicit
Private Sub Command1_Click()
Dim A As Variant
Dim i As Integer
i = 1
A = Parse("hello to you", " ")
Do While A(i) <> ""
MsgBox A(i)
i = i + 1
End Sub
Public Function Parse(sIn As String, sDel As String) As Variant
Dim i As Integer, x As Integer, s As Integer, t As Integer
i = 1: s = 1: t = 1: x = 1
ReDim tArr(1 To x) As Variant
If InStr(1, sIn, sDel) <> 0 Then
   ReDim Preserve tArr(1 To x) As Variant
   tArr(i) = Mid(sIn, t, InStr(s, sIn, sDel) - t)
   t = InStr(s, sIn, sDel) + Len(sDel)
   s = t
   If tArr(i) <> "" Then i = i + 1
   x = x + 1
  Loop Until InStr(s, sIn, sDel) = 0
  ReDim Preserve tArr(1 To x) As Variant
  tArr(i) = Mid(sIn, t, Len(sIn) - t + 1)
  tArr(1) = sIn
End If
Parse = tArr
End Function

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 75 times




No attachments for this post

Loading Comments ...


No comments have been added for this post.

You must be logged in to make a comment.