How to return a value from function...?
you should not tell msgbox, print.. etc.,
Answer Posted / bfakruddin
Function MyFunction(Num)
MyFunction=Num+1
End Function
Num=InputBox("Enter a Number")
call MyFunction(Num)
msgbox MyFunction 'It returns Num+1 value calculated in
Function
Just we have to use the Function Name to return a value...
and we can use that value out of that function...
One more question Can we return more than 1 value from
functions?
visit for qtp info http://qtptesters.wordpress.com
Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
How many types of operators are available in the vbscript language?
Is vbscript language a case-sensitive language and what does it mean?
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)
regular expression that will recognize a browser as long as its name property starts with mybrowser
Hello friends..... Can any give the methods for Ms-Access, and Mozilla firefox in Automation Object Model in QTP. Please give me currect answers... if you do not understand my question please don't give answers. Thanking you.
Develop a parameterized action that accomplishes the following a. Launch a browser of users choice ( example : IE, chrome etc) b. Open up a search engine (Google, Bing etc) c. Perform a search d. Click a particular link depending on the user’s choice ( 1st , 2nd or third link)
If we take 2 strings as “good” and “bad” then what will ‘+’ and ‘&’ operators return?
hi i am trying for testing job for 3+ experience(fake) can u suggest me what type of projects i can keep in my resume and how much of knoeledge i should have abt that project.thnks in advance.urgt plz
Which command is used for writing text on a page?
How to throw an error in vbscript?
How regexp.execute method works?
What is the difference between javascript and vbscript?
By default in vbscript the arguments passed to functions and subroutines are by reference or by value?
Write a code to print numbers from 5 to 0?
Which constant is used for print and display functions and works as same as pressing enter key?