Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Random Number generator and verification problem
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
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.
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
Reply


Messages In This Thread
RE: Random Number generator and verification problem - by Ankesh - 09-26-2012, 11:55 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Create a random number starting with an alphabet QTPmate 4 4,161 07-31-2014, 09:29 AM
Last Post: QTPmate
  Random Values from Drop-Down profqa 5 6,006 12-06-2013, 09:01 AM
Last Post: basanth27
  Creating Random String SomeIntern 0 5,074 08-21-2013, 09:10 PM
Last Post: SomeIntern
  Export verification QAVA 1 2,649 11-05-2012, 10:25 AM
Last Post: sshukla12
  How to choose a random no from list alwarselvam 0 3,165 12-24-2011, 08:28 AM
Last Post: alwarselvam

Forum Jump:


Users browsing this thread: 1 Guest(s)