how to genarate a random numbers in vb?
Answers were Sorted based on User's Feedback
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 |
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 |
who will create the object?
How to get path of the file through scripting?
How do you get the value of a combo box in Javascript?
Why is error handling required?
pls tell me which is good book or site for vbscript?
Inorder to avoid Message box while writing script which alternative method can be used?
How will you get the last occurrence of one string within another string using vbscript?
What are the disadvantages of vbscript?
Difference between Function and Sub routine?
what is the code in QTP to take screen shot? Please send me any one to my mail id. my mailid is manu.sanepalli@gmail.com
Mention what if you do not specify anything when you call a procedure?
write any ttest cases using check points and parameterization