How can we return a value from User Defined Function ?
For Eg. we have 2 functions. In Fun1 i am getting 2 values
(a,b) and i am addding those 2 and storing in to another var
(c). Now i want to pass that var(c) to another function
(fun2). What will be the script?
Answer Posted / chivukula.kumar
'Try this Code in Only MS-Excel
'After opened should be press Alt+F11
'select and double click the ThisWoorkbook in VBA Project
leftside of application
' paste this code in that
Private Sub Workbook_Open()
Call add(1000, 20000, c)
Call subb(c, 20000)
End Sub
'Creation of Fun1 and Fun2(add and subb)
Function add(a, b, c)
a = a + b
c = a
MsgBox c
End Function
Function subb(c, d)
sb = c - d
MsgBox sb
End Function
| Is This Answer Correct ? | 10 Yes | 3 No |
Post New Answer View All Answers
Explain about scrrun.dll?
I have attended Anovatek Software QTP interview. They will give us computer and one web based application with QTP. We have to automate some records (already updated records or new records) using QTP Data driven testing. But we should use for loop? Can any one know how to do data driven testing using For loop?
How many types of operators are available in the vbscript language?
What is the extension of the vbscript file?
Explain the tristate constants in vbscript?
When to use function procedures and what are its characteristics?
Explain a few date functions in vbscript
What if you do not specify anything when you call a procedure?
Can someone please tell me what poor design in a relational database (not the layout or style) is and how it can be avoided? PLEASE...im desperate.
Can we create Crystal Report object in QTP?If yes then what it is and what are its various properties?
Mention when to use function procedures and what are its characteristics?
I need to get some data from data base and store this
(retrieved) data in a excel sheet using VB script in QTP9.0
I have created connection for data base
I have created as excels sheet by using
Set XL=CreateObject("Excel.Application")
XLworksheet.cells(1,1).value= rs.fields.item("<
Anyone have qtp11.0 crack?
What are the uses of vb script?
How are values assigned to the variables in the vbscript language?