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 to get 120 using 5 zeroes, you can use any operator(+, *, /...) in qtp.
generic function for webedit box for web application
How regexp.execute method works?
What is Procedure or Subroutine in VB Script?
How can I get the value of an object property or variable in another frame?
what is the differance between BYVAL,BYREF?
What is the difference between vb debugger and the script debugger?
Why to use option explicit in vb script?
if u ve resrevation for train and u get a number supose 1234xxxokie.after sucessul entering all required fields. now u put that number in search and want to chk wether these ar same or not if both ar same then its okie otherwise test fail.what would be the vb script code for it to compare these two values of different page.
Hi, Anybody could you Please tell me How to write the script for Checking whether given number is Prime Number or not..Thanks in Advance
Write a Program to add 2 numbers without using operators (+,-) and without using third variable. Note: Use VBScript only Hint: You can use other operators like '/' & '*'(Division & Multiplication)
Explain about scrrun.dll in vbscript?