|
-
Nov 26th, 2001, 05:38 AM
#1
Thread Starter
Addicted Member
(Resolved)..Randomly picking Numbers and Alphabets ....
Hello,
I need help on Randomly picking Numbers and alphabets. Please help..........
Thanxs.
_______________________________________________
vbBoy.
Last edited by vbBoy; Nov 27th, 2001 at 01:57 PM.
-
Nov 26th, 2001, 07:16 AM
#2
Code:
Function rndAlphaNum() as string
Dim tmp as string
tmp = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
rndAlphaNum = mid(tmp, rnd*36 + 1, 1)
End function
-
Nov 26th, 2001, 08:20 AM
#3
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
-
Nov 27th, 2001, 01:56 PM
#4
Thread Starter
Addicted Member
Reply to jim mcnamara and Matthew Gates
I thank you.
They examples really helped me.
____________________________________________
vbBoy.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|