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

create a form to accept username and password validate the username and password with using message box, display the corresponding user message

0 Answers   CSC,


write a vb script to display ***** ***** ***** ***** *****

4 Answers  


Hi All, I am facing one problem in QTP. There is link object in my application that exist in the Frame in mozilla firefox. Click event on that object is not working but once the frame is enabled/activated then click event works fine.But the frame does not have the activate property. This problem is coming in firefox only. Regards

0 Answers  


Which date function is used in the vbscript language to find the difference between the 2 dates?

0 Answers  


Explain How do you create a recordset object in vbscript?

0 Answers  






Plzzzzzzz can any one tell me which is the best institute in hyderabad for learing VBScript. plz do answer guys its urgent plzzzzzzz. thanks in advance.

0 Answers  


What is loose binding? Why is it not a good practice to use it?

0 Answers  


How strcomp function works?

0 Answers  


what is visual basic?

2 Answers   Seion Infotech,


write a vb script to display the code "vbscripting" alphabet by alphabet(i e 1st v then b and up to g)

2 Answers  


how to validate the text in a web table

2 Answers   Mphasis,


compare the string without using stringcomp function?

1 Answers   CSS Corp,


Categories