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 are values assigned to the variables in the vbscript language?
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)
Why is it recommended to close the database connection every time after the work is completed?
What is the technology used by vb script?
What is Procedure or Subroutine in VB Script?
How to return only alpha bate string from an string str = "bibhu@#$%&das&*)(SUndar"
Explain the string concatenation function in vbscript?
Hi anyone Can Send Solution to the Question wt m posting now Prepare Script for the Bellow Scenario? Login to Gmail Page Open Inbox check Mails save them in a Folder
Mention what is the difference between vbscript and vba?
What is vbscript?
How to create pull down menu box using vb script
Write VB script to convert from feet to inches(hint 1feet=12 inches)