Dim MyValue
Randomize ' Initialize random-number generator.
MyValue=RandomNumber(48,57)
Digital=chr(MyValue)
End Function
Public Function UppercaseLetters()
Dim MyValue
Randomize ' Initialize random-number generator.
MyValue=RandomNumber(65,90)
UppercaseLetters=chr(MyValue)
End Function
Public Function LowercaseLetters()
Dim MyValue
Randomize ' Initialize random-number generator.
MyValue=RandomNumber(97,122)
LowercaseLetters=chr(MyValue)
End Function
Public Function SpecialCharacters()
Dim MyValue,MyCtrol
Randomize ' Initialize random-number generator.
MyCtrol=RandomNumber(1,4)
Randomize ' Initialize random-number generator.
Select Case MyCtrol
Case 1
MyValue=RandomNumber(32,47)
Case 2
MyValue=RandomNumber(58,64)
Case 3
MyValue=RandomNumber(91,96)
Case 4
MyValue=RandomNumber(123,126)
End Select
SpecialCharacters=chr(MyValue)
End Function
Public Function DecimalPoint()
Dim MyValue
MyValue=46 ' .
DecimalPoint=chr(MyValue)
End Function
Public Function MailCharacter()
Dim MyValue
MyValue=64 '@
MailCharacter=chr(MyValue)
End Function
For i = 0 To UBound(MyArray)
Select Case MyArray(i)
Case "1"
str=Digital()
Case "A"
str=UppercaseLetters()
Case "a"
str=LowercaseLetters()
Case "p"
str=DecimalPoint
Case "m"
str=MailCharacter
Case "s"
str=SpecialCharacters()
End Select
strSum=strSum&str
Next
msgbox(strSum)
'StrRandomMail=strSum
End Function