hey im trying to random a num,ber in a text box is this how i do it
Text1.Text = 0 <> 100
Text2.Text = 0 <> 100
yeah im kinda new to this
Printable View
hey im trying to random a num,ber in a text box is this how i do it
Text1.Text = 0 <> 100
Text2.Text = 0 <> 100
yeah im kinda new to this
Here's an example of Random numbers.
Code:Randomize Timer
MyNum = Int(Rnd * 100) + 1
Text1.Text = MyNum
rnd returns a "random" value between 0 and 1
rnd -1 will reset the random number generator
randomize will simulate randomization by using that value as a seed to the next random values, using timer as Meg showed will generate different values each time you execute, simulating randomness
Also, the + 1 is there so the number can be 100, else, it will only go from 0-99.
Meg, what do you prefer option base 1 or 0 when you create arrays? I prefer 0 and i'm annoyed with listview, treeview and classcollection