VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



A REAL RANDOM NUMBER GENERATOR

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.

Rate A REAL RANDOM NUMBER GENERATOR

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

Download this snippet    Add to My Saved Code

A REAL RANDOM NUMBER GENERATOR Comments

No comments have been posted about A REAL RANDOM NUMBER GENERATOR. Why not be the first to post a comment about A REAL RANDOM NUMBER GENERATOR.

Post your comment

Subject:
Message:
0/1000 characters