how to genarate a random numbers in vb?

Answers were Sorted based on User's Feedback



how to genarate a random numbers in vb?..

Answer / cnu

Function Random(max,min)
Randomize
Random=Int((max-min+1)*Rnd+min)
End Function

Dim A
A = random(100,1)
msgbox ("The random numer is:" &A)

Is This Answer Correct ?    2 Yes 0 No

how to genarate a random numbers in vb?..

Answer / swamireddy

to genarate random numbers in vb using the random fuction
the fuction systax for
function Random(Lowerbound As Long, Upperbound As Long)
Randomize
Random = Int(Rnd * Upperbound) + Lowerbound
End Function
this fuction use automatically genarate a random numbers.
how to call the fuction.
a=random(lowerbound,upperbound)

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More VB Script Interview Questions

How to throw an error in vbscript?

0 Answers  


Explain vbscript in detail?

0 Answers  


Write a program to resize an array of 5 elements to 4 elements and display all the elements.

1 Answers  


can u test the application without add-in?

1 Answers  


Explain about .wsf files?

0 Answers  






How to declare an array in vbscript?

0 Answers  


write any ttest cases using check points and parameterization

0 Answers  


What are events in the vbscript language?

0 Answers  


What is Querystring collection?

0 Answers  


Which loop is used in case of arrays in the vbscript language?

0 Answers  


what is the use of QCUtil? explain with one example?

1 Answers  


What is the difference between a dictionary and an array?

0 Answers  


Categories