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 / chivukula.kumar

'Try this Code in Only MS-Excel

'After opened should be press Alt+F11
'select and double click the ThisWoorkbook in VBA Project
leftside of application
' paste this code in that

Private Sub Workbook_Open()
Call add(1000, 20000, c)
Call subb(c, 20000)
End Sub

'Creation of Fun1 and Fun2(add and subb)

Function add(a, b, c)
a = a + b
c = a
MsgBox c
End Function

Function subb(c, d)
sb = c - d
MsgBox sb
End Function

Is This Answer Correct ?    10 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is sql loader? Explain the files used by sql loader to load file?

1106


what is the features of visual basic?

2053


What is the difference between VBScript and JavaScript?

2642


How to Enter Values on the Command promt using VB script

2002


What is the use of the ‘open’ method to work with the database in the vbscript language and what connection string is passed in the same and what is its usage?

960


How can constants be declared in the vbscript language?

953


wht must be the interview question on corinthian information technology solutions incorporated.

2578


What is dictionary object in vbscript? Explain?

1131


What is the difference between vb debugger and the script debugger?

1082


How are arrays declared in the vbscript language?

951


Which in-built function is used to format the number in the vbscript language?

962


write a program to display configuration of a local system with the help of vb script.

2069


What are the special sub-types in vbscript?

1001


Explain about .wsf files?

1074


What is the difference between a dictionary and an array?

1009