Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
Create a random number between two numbers. Exa...
Author:
Aydin Maxfield
E-mail:
Click to e-mail author
Submitted:
4/23/2001
Version:
VB6
Compatibility:
VB6
Category:
Mathematics
Views:
9641
Create a random number between two numbers. Example - a number between 50 and 100.
Declarations:
'none
Code:
Private Sub Command1_Click() Label1.Caption = Int(Rnd * 100) 'create the random number If Label1.Caption < 50 Then 'if the number is lower than 50, Command1_Click 'redo the procedure End If End Sub _______________________________________________________ Private Sub Form_Load() Randomize 'create truly ranbom numbers End Sub
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement