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 |
How will you get the octal value of the given number in vbscript?
How to create MSAcess table foriegn key
What is dictionary object in vbscript? Explain?
Hi I don't have any idea on VBscript. can any one point me to a good web site to learn VBscript. Regards lina
What are the 2 ways to pass a value to the function?
How to return only alpha bate string from an string str = "bibhu@#$%&das&*)(SUndar"
Program to use input box and send even numbers into sheet1 and odd numbers into sheet2 and prime numbers into sheet3 using vbscript(QTP)?
which is the bset training centre to learn automation tools?
Mention the environments where vbscript could be run?
How can the spaces from the string be removed?
Which keyword is used to declare a variable in the vbscript language?
Check whether given Number is Even or Odd?