Private Function IsValidEmailAddress(ByVal sEmail As String, Optional ByRef sReason As String) As Boolean
sEmail = LCase(Trim(sEmail))
If Len(sEmail) < 7 Then
sReason = "Too short"
ElseIf sEmail Like "*[!0-9a-z@._+-]*" Then
sReason = "Invalid character"
ElseIf Not sEmail Like "*@*.*" Then
sReason = "Missing the @ or ."
ElseIf sEmail Like "*@*@*" Then
sReason = "Too many @"
ElseIf sEmail Like "[@.]*" Or sEmail Like "*[@.]" _
Or sEmail Like "*..*" Or Not sEmail Like "?*@?*.*?" Then
sReason = "Invalid format"
Dim n As Integer
n = Len(sEmail) - InStrRev(sEmail, ".")
If n > 3 Then
sReason = "Suffix too long"
ElseIf n < 2 Then
sReason = "Suffix too short"
sReason = Empty
IsValidEmailAddress = True
here call it (Normally On the lostfocus event)
Private Sub Text1_LostFocus()
Dim bool As Boolean, reason As String
bool = IsValidEmailAddress(Me.Text1.Text, reason)
If (bool <> True) Then
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...
Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...