09-26-2012, 11:55 AM
Jinnah,
Can you explain why are you using For loop. There is absolutely no need of this loop. You need to use randomize keyword before creating the random number.
You can try any of the below options.
Regards,
Ankesh
Can you explain why are you using For loop. There is absolutely no need of this loop. You need to use randomize keyword before creating the random number.
You can try any of the below options.
Code:
1.
intMaxValue=99
intMinValue=10
Randomize 'This will generate a unique number every time
intRndVariable= Int((intMaxValue-intMinValue+ 1) * Rnd +intMinValue)
2. Use RandomNumber function
intRandomNumber=RandomNumber(intLoweLimit,Upperlimit)
e.g., a=RandomNumber(10,99)
Regards,
Ankesh