by Alex M (4 Submissions)
Category: Miscellaneous
Compatability: Visual Basic 3.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (11 Votes)
This code will create completely random numbers for you!
Inputs
The user MUST hace a Label named Label1 and a Button named Command1!!!
Code Returns
This program, after pressing the button, creates a random number in the label.
Sub Command1_Click ()
Randomize 'makes it random
'makes a random number, 1 - 100 in Label1
Value = Int(100 * Rnd)
Label1.Caption = Str$(Value)
End Sub