How to return a value from function...?

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

Answer Posted / rishi agrawal

Function MyFunction(Num)

InputBox("What is your name?","My Input")
'Code for return value from function
MyFunction= Num + 1

End Function

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Like OPTION EXPLICIT statement what are the other statements used in vbscript and their usage. Please post me all the statements please.

1893


HOw we can apply web service checkpoint in QTP 9.5? I tried it out with net connection also. But not getting success.

2274


What is loose binding? Why is it not a good practice to use it?

888


Can any one provide code for Mid(string,start[,length]). I have been asked to write code for Mid(). i.e We need to define our own function say MyMid() which should behave same like built-in Mid function

2134


Explain the operator precedence in vb script?

858


If a calulator having 3 buttons (of any number)in 3 of them one is not working properly due to which answer is wrong always. write a script to find out which button is not working properly ?

1792


when we use filter funtiom invb script(QTP)

2504


Hello friends..... Can any give the methods for Ms-Access, and Mozilla firefox in Automation Object Model in QTP. Please give me currect answers... if you do not understand my question please don't give answers. Thanking you.

2110


Explain the extension .hta?

744


What is variant in vb script?

867


Explain about operator precedence in vb script?

834


How to get the length of the string by making use of the string function?

829


what is the standards used for writing the script in QTP

2093


What is the purpose of regexp object in vbscript?

786


How to Import data from a file (file is on the desktop) to the data table

1766