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

what is the standards used for writing the script in QTP

1885


How to use QTP Object in .vbs(vbscript file) file Ex: Browser().., wait(), exist() and etc...

2901


Write a Script for ATM in QTP

3337


Explain about tristate constants?

583


Explain the string concatenation function in vbscript?

536






Which object is used to work with the excel sheets in the vbscript language and what statement is used to create this object?

481


hi i am trying for testing job for 3+ experience(fake) can u suggest me what type of projects i can keep in my resume and how much of knoeledge i should have abt that project.thnks in advance.urgt plz

2580


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

631


How to make professional test report using vbscript code in UFT, which gives us complete analysis of the test.

2496


What are class events?

581


If else for do while select in vb script?

640


Set srchobj=Description.Create() srchobj("type").value="text" srchobj("name").value="q" srchobj("html tag").value="input" browser("micclass:=google").Page("micclass:=google").webedit (srchobj).Set "qtp" what's wrong in my code pls tell me ? the above code working fine and i got my result pass,now i am trying to run the program it shows general run time error why?pls help me i am in learning stage ?

1550


Explain the constants in vbscript?

561


What is the difference between do until loop and do while loop?

538


What is the difference between VBScript and JavaScript?

2059