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 compare two strings in vbscript?
write a vb script to generate fibonnaci numbers
What are the rules to name variable in vbscript?
Which event is triggered when mouse focus comes out of an element in the vbscript language?
Explain about scrrun.dll?
How will you get a string with the specified character the specified number of times in vbscript?
Hi, Anybody could tell me What is the script for Reverse of Given number. Ex:236--632. Thanks in Advance..
How to Enter Values on the Command promt using VB script
i wrote vbscripit code in notepad i got error i am in learning stage if u ps tell me what wrong in my code my error is "object required descriptive at line one run time error"and my code is "set usernameobj=Descriptive.Create() usernameobj( "name").value="Username" set passwordobj=Descriptive.Create() passwordobj("name").value="password" set signinobj=Descriptive.Create() signinobj("name").value="sigin" browser("gmail").page("gmail").WebEdit("usernameobj").set ("enter username") Browser("gmail").Page("gmail").WebEdit("passwordobj").Set secure.Crypt.Encrypt("enter password") browser("gmail").page("gmail").WebButton("siginobj").click
how to find greatest of n numbers!
There are 5 web pages.write a script to click the button on 4th web page.
What is Querystring collection?