this is the basic way on how to generate a Random Numbers in VB6, Just Add 3 Label
Control named it with lbl1,lbl2,lbl3 and 1 command button, and create a Sub Procedure
and call it vial click event of your command button and the code will look like this:
lbl1.Caption = CStr(Int(Rnd() * 10))
lbl2.Caption = CStr(Int(Rnd() * 10))
lbl3.Caption = CStr(Int(Rnd() * 10))
End Sub
Happy Coding (^_^)
Control named it with lbl1,lbl2,lbl3 and 1 command button, and create a Sub Procedure
and call it vial click event of your command button and the code will look like this:
Private Sub Command1_Click()
Call Randomize
End Sub
Sub Randomize()Call Randomize
End Sub
lbl1.Caption = CStr(Int(Rnd() * 10))
lbl2.Caption = CStr(Int(Rnd() * 10))
lbl3.Caption = CStr(Int(Rnd() * 10))
End Sub
Happy Coding (^_^)
Tags:
Visual Basic 6.0
Thanks for this Code,.! It helps me a lot.
Can you send me, How to generate Alpha-Numeric for example.
abc81239
sdj12324
jgf34577
Here's my email. uclmbenz_castro@yahoo.com
Thanks for this.