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
Which operator is used for fetching the modulus of the 2 numbers in the vbscript language?
Which function is used in the vbscript language to convert the specified expression into a date type value?
What is purpose of scripting.filesystemobject class in vbscript?
How can the spaces from the string be removed?
what is diff between static and dynaic arrys?
What methods are used to create text files and open text files in the vbscript language?
Explain the tristate constants in vbscript?
What are the data types supported by vbscript?
Mention what is the use of option explicit in vbscript?
What are events in the vbscript language?
Which date function is used in the vbscript language to find the difference between the 2 dates?
How will you get the natural logarithm of the given number in vbscript?
Description.Create
What is the difference between vbscript and vba?
Explain the adodb.stream class?