How can we return a value from User Defined Function ?
For Eg. we have 2 functions. In Fun1 i am getting 2 values
(a,b) and i am addding those 2 and storing in to another var
(c). Now i want to pass that var(c) to another function
(fun2). What will be the script?
Answer Posted / sangee
Call add(40,20,c)
Call subs(c,10)
Function add(a,b,c)
c=a+b
msgbox c
End Function
Function subs(c,d)
e=c*d
msgbox e
End Function
| Is This Answer Correct ? | 6 Yes | 2 No |
Post New Answer View All Answers
By default in vbscript the arguments passed to functions and subroutines are by reference or by value?
What are lbound and ubound in the vbscript language?
What are events in the vbscript language?
If a calulator having 3 buttons (of any number)in 3 of them one is not working properly due to which answer is wrong always. write a script to find out which button is not working properly ?
What's the difference between vbscript and vb.net?
Which conditional statement is the most convenient one to use in the case of multiple conditions in the vbscript language?
Which function is used to perform string comparison?
Explain about the functionality of vb script?
How to take whole text output from screen of Bitmap Application.
What are class events?
Is vbscript language a case-sensitive language and what does it mean?
How will you get a combined string from array of string in vbscript?
How to add actions in driver script to run those actions in QTP?
Please let me Know regarding any material regarding VB Scripting which should be easily understandable for Beginners.
write a function to read the items from combobox of Flight reservation & save in excel (QTP)??