This is for those of you wanting to know how to generate random numbers. I will explain how to generate a random number from 1 to 100 in a text box.
Step 1: Create a textbox and name it txtrandom.
Step 2: Create a command button and name it cmdrandom.
Double-click on the button to write its code.
Type in this code:
Private Sub Cmdrandom_Click()
For i = 0 To 9
Txtrandom.Text = Format(((Rnd(i) * 100) + 1), "0")
This will have put a completely random number in the textbox every time you click the button.