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


Please Help Members By Posting Answers For Below Questions

In html file what is an ideal position to include vbscript?

807


I need to get some data from data base and store this (retrieved) data in a excel sheet using VB script in QTP9.0 I have created connection for data base I have created as excels sheet by using Set XL=CreateObject("Excel.Application") XLworksheet.cells(1,1).value= rs.fields.item("<>") I have taken a for loop and changed the cells values (1 as i and another 1 as j) But still I am not able to get Plz kindly tell me know this . It is very urgent

1769


how to comvert 120 into one hunderd twenty rupees only and vice varsa

1800


What is vbscript?

593


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)

3187






How will you get a random number between 0 and 1 in vbscript?

717


A folder is there inside no of textfiles are avilable. How do count the textfiles. Normally folder means we are using subfolder methods but textfiles is not working for subfolder methods and how do get file name also.

1506


What is dictionary object in vbscript? Explain?

623


What purpose does ‘on error resume next’ serves?

545


Explain How do you create a recordset object in vbscript?

564


after medical test,when will be the police verification

1710


How will you get a string with the specified character the specified number of times in vbscript?

571


Which keyword is used to declare a variable in the vbscript language?

529


How can you destroy an object in vbscript?

639


Which function is used in the vbscript language to convert the specified expression into a date type value?

520