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
Which date function is used in the vbscript language to find the difference between the 2 dates?
What are the naming conventions while declaring a variable in the vbscript language?
Which event is triggered when mouse focus comes out of an element in the vbscript language?
Which in-built function is used to format the number in the vbscript language?
How to take whole text output from screen of Bitmap Application.
How to assign a date value to a variable?
Hi, Can anyone please send me vb script examples to practice vb and also material to learn vb scripting in QTP? my email id : hareen_11@yahoo.com
What is loose binding? Why is it not a good practice to use it?
What is the use of the recordset object and which statement is used to create such an object?
Which operator is used to perform the comparison among 2 operands in the vbscript language?
What are class events?
How to access array data?
Which object is used to work with the excel sheets in the vbscript language and what statement is used to create this object?
Please let me Know regarding any material regarding VB Scripting which should be easily understandable for Beginners.
When are redim statement and preserve keyword used in the vbscript language?