hello there, i need some help as my teacher gave us a very vague example on random number code and i'm stuck on doing my assigned homework. the assignment is to have three text boxes, generate random numbers between 1-10, and afterwards both automatically added together. so one text displays the first variable, the second box for the second variable, and the final box for the answer.
honestly this is far as i could go cause it seems so different to me then what we have done so far and i haven't had a chance to run this on VB as i'm not at school right now, the random in general confuses me on the 0,1 and the decimal
cmdCalculate
dim A As Integer
dim B As Integer
Public Function RandomNum (X as Integer) As Integer
Randomize
Random Nu=Int (X*Rnd)+1 {1,10}
firstNum=RandomNum(Limit)
txtFirstNum.text=Str$(A)
secondNum=RandomNum(Limit)
txtSecondNum=Str$(B)