how to genarate a random numbers in vb?

Answers were Sorted based on User's Feedback



how to genarate a random numbers in vb?..

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

how to genarate a random numbers in vb?..

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

Post New Answer

More VB Script Interview Questions

Write a VB Script to count blank Lines in a notepad

2 Answers   IBM,


Mention what is the use of option explicit in vbscript?

0 Answers  


wht must be the interview question on corinthian information technology solutions incorporated.

0 Answers   HP,


How to write functions and sub in vb script?

0 Answers  


hi all, i had a question, that how to find out hiding a coloumn in a table i had a table having the following column names NAME DESCRIPTION CREATED TIME CREATED USER if i right clicked on a NAME column it will displays a menu having the same column names in a list like NAME DESCRIPTION CREATED TIME CREATED USER with check boxes.if i unched any check box, that column name should not be appear in the main table column names could anyone please solve this problem?

0 Answers   Livetek,






What is a difference between scripting language and programming language?

2 Answers  


i need to login to my yahoo accoutnt using VB Script, automating the operation of webobjects, even launching of IE. How?

1 Answers   Mphasis,


how to declare a variable in vbscript using vbscript

4 Answers  


1)How to test whether items in a weblist are in alphabetical order or not?

1 Answers   TCS,


How to select a value from a list box by using Selenium web-driver?

2 Answers   HCL,


Could Anybody Please tell me What is the script for Find 3rd Largest element in the Array without using a SORT function int Find(int arr[], int size); Thanks in Advance..

0 Answers   Amazon,


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

0 Answers  


Categories