VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



random aplication

by kevin lynch (2 Submissions)
Category: Windows System Services
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 24th March 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

random aplication

Rate random aplication



Randomize
   Dim 1 As Integer
   1 = Int(Rnd(1) * 9) ' create random numbers between 1 and 9
   Text1.Text = CStr(t1) ' display random number in text box
End Sub
'If you want to put different numbers in multiple text boxes
'use the sample code below

Randomize
   Dim t1 As Integer
   t1 = Int(Rnd(1) * 9)
   Text2.Text = CStr(t1)
   Dim t2 As Integer
   t2 = Int(Rnd(1) * 9)
   Text3.Text = CStr(t2)
   Dim t3 As Integer
   t3 = Int(Rnd(1) * 9)
   Text4.Text = CStr(t3)
   Dim t5 As Integer
   t5 = Int(Rnd(1) * 9)
   Text5.Text = CStr(t5)
   Dim t6 As Integer
   t6 = Int(Rnd(1) * 9)
   Text6.Text = CStr(t6)
   Dim t7 As Integer
   t7 = Int(Rnd(1) * 9)
   Text7.Text = CStr(t7)
'If you want all these numbers to appear in another text box use 
'this code
Text8.Text = (Text1.Text) & (Text2.Text) & (Text3.Text) & (Text4.Text) & (Text5.Text) & (Text6.Text) & (Text7.Text)
End Sub

Download this snippet    Add to My Saved Code

random aplication Comments

No comments have been posted about random aplication. Why not be the first to post a comment about random aplication.

Post your comment

Subject:
Message:
0/1000 characters