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
Hello Friends , I am the new joinner of this website. I am working with Sapient ,Gurgoan I would like to ask few qurries regarding the QTP Tool of (Testing) Currently working on QTP Tool . I would like to no learn VB Script can u name some Books which i get in market. And a small issue in QTP I had 2 users right i have to login and send the document from this user to second user right. when i am send this doc some contendId number generates right. now i am loging into second user and i have to search for that contentId right i found it now i dont want to accept the document so i had an opption of check out ok i have to click on check out my QTP Code is like this Browser(" ").Page(" ").WebTable(" ").ChildItem (3,5,"Image",0).click Browser(" ").Page(" ").Link("ChecK Out").Click i new this code is perfectly right but when i am run the script i have to click on that particular contentId and click on check out but now the Problem is started the error is the document has been already checked out remeber every time my content id changes means it is the new contentId which is not been used atleast once Please help me out in this issue i am in big trouble
What is the purpose of regexp object in vbscript?
Hellow friends, I am learning QTP,but here problem is VB script. please guide me how to learn VB script w.r.t QTP and if you know any books tell me or if you have any materials or any use full material or any else w.r.t QTP please post me p.p.sekhar
Give me sm ideas to write Vbscripts abt protocol testing abilash700@gmail.com.
who will create the object?
where can i learn VB scripint ?
Explain about tristate constants in vbscript?
how does vb script help in web page designing? explain with example.
Which keyword is used to declare a variable in the vbscript language?
Which constant is used for print and display functions and works as same as pressing enter key?
please can you help me to get a code of flames using a visual basic 6
I want to run QTP script on Linux server is it possible to do this by connecting Windows to Linux through VPN/Terminal Server and just run the script on Linux server.
Explain the asc function?
Write a Script for ATM in QTP
Explain sga memory structures?