Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 / varun

dim a,b,c
fun1 a,b,c
fun2 c
msgbox("done")

sub fun1(a,b,c)
a = cint(inputbox("first number"))
b = cint(inputbox("second number"))
c = a + b
End sub

sub fun2(c)
msgbox(c)
end sub

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between vbscript and vba?

1059


What is the use of the formatdatetime function in the vbscript language?

956


Difference between dim,public and private variables in vb script?

901


What is the technology used by vb script?

916


Mention what is byref and byval parameters in vbscript?

951


How to capture a runtime error in vbscript?

1087


Explain the arrays in vb script?

1001


Write a vbscript procedure that converts feet to inches. Hint: there are 12 inches in a foot?

985


Can we create Crystal Report object in QTP?If yes then what it is and what are its various properties?

3408


Explain about tristate constants?

950


Capture the Unique label changes on google home page for I am feeling lucky button and save those label changes to Notepad Note: Using QTP

2305


What are the 2 ways to pass a value to the function?

882


how to write a vb script in QTP for yahoo registration form, i want to check the performance also like performance test, stress, load test like that.

5154


Mention the environments where vbscript could be run?

1147


while using Keyward driven framework in QTPif new requirements are added how to manage it...plz ans

2000