how to genarate a random numbers in vb?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

can anyone tell me the procedure of interview held in applabs

1753


what is diff between static and dynaic arrys?

1588


Which date function is used in the vbscript language to find the difference between the 2 dates?

595


Which conditional statement is the most convenient one to use in the case of multiple conditions in the vbscript language?

526


how to write validation function for date in vb script

2146






Mention what is vbscript?

598


Explain the functionality of vbscript?

538


why do u choose to go for testing why cant for devoloping

1594


Can any one provide code for Mid(string,start[,length]). I have been asked to write code for Mid(). i.e We need to define our own function say MyMid() which should behave same like built-in Mid function

1921


Write a code to print numbers from 5 to 0?

677


How will you get a random number between 0 and 1 in vbscript?

719


Can someone please tell me what poor design in a relational database (not the layout or style) is and how it can be avoided? PLEASE...im desperate.

1417


What are the valid scopes of a variable in vbscript?

610


Set srchobj=Description.Create() srchobj("type").value="text" srchobj("name").value="q" srchobj("html tag").value="input" browser("micclass:=google").Page("micclass:=google").webedit (srchobj).Set "qtp" what's wrong in my code pls tell me ? the above code working fine and i got my result pass,now i am trying to run the program it shows general run time error why?pls help me i am in learning stage ?

1554


How are comments handled in the vbscript language?

513