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 to return a value from function...?

you should not tell msgbox, print.. etc.,

Answer Posted / vgr

Dim StrFunVal
StrFunVal = fn_MyFunction(7)

Function fn_MyFunction(Num)
fn_MyFunction=Num+8
End Function

During the execution the "StrFunVal" variable will contain
the value 15. If you don't want to use 'Msgbox' or 'Print'
then declaring a variable is prefered.

For your other question I haven't come across returning
more than 1 value from functions. Probably we have to use a
ARRAY kind of stuff...but not sure. Need to work on it.

Cheers,
VGR

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

1023


What are class properties?

1173


What are the rules to name variable in vbscript?

1079


Explain about the asc function?

1065


how does vb script help in web page designing? explain with example.

1997


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

1047


What is the purpose of drive object of scripting.filesystemobject class in vbscript?

1011


Explain the functionality of vbscript?

943


how to write validation function for date in vb script

2625


What is the difference between VBScript and JavaScript?

2716


What are the uses of vb script?

1041


Explain the .wsf files?

971


filter the array values without using filter function?

2108


Explain the constants in vbscript?

993


write any ttest cases using check points and parameterization

2281