How to return a value from function...?
you should not tell msgbox, print.. etc.,
Answer Posted / bfakruddin
Function MyFunction(Num)
MyFunction=Num+1
End Function
Num=InputBox("Enter a Number")
call MyFunction(Num)
msgbox MyFunction 'It returns Num+1 value calculated in
Function
Just we have to use the Function Name to return a value...
and we can use that value out of that function...
One more question Can we return more than 1 value from
functions?
visit for qtp info http://qtptesters.wordpress.com
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Can we create Crystal Report object in QTP?If yes then what it is and what are its various properties?
When are redim statement and preserve keyword used in the vbscript language?
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.
How to find the font in qtp. Scenario:After entering the username and passwd you will be navigate into the "welcome:Username" page.Now I want to extarct font for this message.
Explain the arrays in vb script?
does anyone have qtp11.0 license key.Please sendit to my mail id-rrvv2011@gmail.com...Thanks
What are the different types of operators and their order of precedence?
Mention what is the technology used by vb script?
Write program for identifyig duplicates in flight Departing from and Arriving in mercury tours(web application).
i wrote vbscripit code in notepad i got error i am in learning stage if u ps tell me what wrong in my code my error is "object required descriptive at line one run time error"and my code is "set usernameobj=Descriptive.Create() usernameobj( "name").value="Username" set passwordobj=Descriptive.Create() passwordobj("name").value="password" set signinobj=Descriptive.Create() signinobj("name").value="sigin" browser("gmail").page("gmail").WebEdit("usernameobj").set ("enter username") Browser("gmail").Page("gmail").WebEdit("passwordobj").Set secure.Crypt.Encrypt("enter password") browser("gmail").page("gmail").WebButton("siginobj").click
How should i Create Email invite with server-side Coding?
what is event handling?
What is the difference between function and procedure?
Can anyone send me a vb script function for verifying the functionality of active links on a web page
What is the difference between javascript and vbscript?