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

What are the different types of operators and their order of precedence?

566


Hi Friends Rajendra this is bhavani prasad, iam working Hyderabad. i faced one problem with qtp recording mode i.e in my application there is 100 records first we click the first record that record will be jumped to next session and 99 records will there stop the recording and run the same script .Run this script qtp does not identify the records. So plz tell me what is the solution.

1568


What are the uses of vb script?

585


while using Keyward driven framework in QTPif new requirements are added how to manage it...plz ans

1567


A folder is there inside no of textfiles are avilable. How do count the textfiles. Normally folder means we are using subfolder methods but textfiles is not working for subfolder methods and how do get file name also.

1506






How to open excel in vb script?

570


What are the data types supported by vbscript?

578


How will you reverse a string in vbscript?

620


Which keyword is used to declare a variable in the vbscript language?

529


In what way program "hello world" you can write in vbscript?

645


Mention what is byref and byval parameters in vbscript?

578


Which in-built function is used to format the number in the vbscript language?

575


Mention how to access array data?

512


Hi All, I am facing one problem in QTP. There is link object in my application that exist in the Frame in mozilla firefox. Click event on that object is not working but once the frame is enabled/activated then click event works fine.But the frame does not have the activate property. This problem is coming in firefox only. Regards

2259


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.

1413