How to generate 3 digit random number?

Answers were Sorted based on User's Feedback



How to generate 3 digit random number?..

Answer / nazeer ahmed

dim upperlimit
dim lowerlimit
dim randomnumber(4)
upperlimit = 500
lowerlimit = 1
For x = 0 to 4
randomize timer
randomnumber(x)=Int((upperlimit-lowerlimit+1)*Rnd)+lowerlimit
msgbox randomnumber(x)
Next

Is This Answer Correct ?    4 Yes 2 No

How to generate 3 digit random number?..

Answer / prathyusha

Randomize
intmax=1000
intmin=300
rNum=Int((intmax-intmin+1)*Rnd+intmin)
MsgBox rnum

Is This Answer Correct ?    0 Yes 0 No

How to generate 3 digit random number?..

Answer / eswar

For i=1 to 3
x = RandomNumber(1,9)
y=y&x
Next
MsgBox y

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More VB Script Interview Questions

write a function to read the items from combobox of Flight reservation & save in excel (QTP)??

0 Answers  


how to set one column as primary key in QTP and fetch values accordingly

0 Answers   Ford,


How can you create an object in vbscript?

0 Answers  


How to create a function in vbscript?

0 Answers  


What is the equivalent of VBScript?s On Error In Jscript ?

1 Answers   Microsoft,






What are the environments supported by vbscript language?

0 Answers  


Capture the Unique label changes on google home page for I am feeling lucky button and save those label changes to Notepad Note: Using QTP

0 Answers   Quest,


Which keyword is used to declare a variable in the vbscript language?

0 Answers  


1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 how to find using vbscripting

3 Answers  


Mention what is vbscript?

0 Answers  


Explain about the support of asp for vb script functionality?

0 Answers  


hi, How will write a regular expression of date in VB scripting.

1 Answers  


Categories