Sub Generate_Random_Serial()
Dim lngUnique_Random_Number_One As Long
Dim lngUnique_Random_Number_Two As Long
Dim stUnique_Random_Letter_One As String
Dim stUnique_Random_Letter_Two As String
Dim strRandomly_Generated_Serial As String
' Reset the random seed.
Rnd -1
' Initialize the seed using Timer.
Randomize (Timer)
'Randomly choose a number from 1 to 8,923,875
lngUnique_Random_Number_One = Int((8923875 - 1 + 1) * Rnd() + 1)
lngUnique_Random_Number_Two = Int((8923875 - 1 + 1) * Rnd() + 1)
'Randomly choose a character (letter)
stUnique_Random_Letter_One = chr(CInt(Rnd * 26) + 65)
stUnique_Random_Letter_Two = chr(CInt(Rnd * 26) + 65)
'Concatenate and build the serial
strRandomly_Generated_Serial = _
lngUnique_Random_Number_One _
& stUnique_Random_Letter_One _
& lngUnique_Random_Number_Two _
& stUnique_Random_Letter_Two
MsgBox "Requested serial is: " & strRandomly_Generated_Serial, vbInformation, strRandomly_Generated_Serial
End Sub