Hello,
I need help on Randomly picking Numbers and alphabets. Please help..........
Thanxs.
_______________________________________________
vbBoy.
Printable View
Hello,
I need help on Randomly picking Numbers and alphabets. Please help..........
Thanxs.
_______________________________________________
vbBoy.
Code:
Function rndAlphaNum() as string
Dim tmp as string
tmp = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
rndAlphaNum = mid(tmp, rnd*36 + 1, 1)
End function
Here's another way:
VB Code:
Private Function ChooseRandom() As String Randomize Timer ChooseRandom = Chr(Int((Rnd * 90) + 33)) End Function Private Sub Command1_Click() MsgBox ChooseRandom End Sub
I thank you.
They examples really helped me.
____________________________________________
vbBoy.