Micro Focus QTP (UFT) Forums
Calling Financial Functions - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Calling Financial Functions (/Thread-Calling-Financial-Functions)



Calling Financial Functions - Raj20091 - 11-03-2009

Hello,

Is there a way to call VBA Financial Functions such as PV, PMT from QTP?
Or
These functions are available in Excel, is there a way to call these functions with out actually writing the parameter to these functions to excel?

Thanks,
Raj


RE: Calling Financial Functions - milindsd - 11-04-2009

Hi,
You can use Excel formulas, in the QTP Data Table.

Bellow is the example:
'''-------------------------------------------------------------
Code:
DataTable("Formula", dtLocalSheet) = "=PV(10, 48, 200000)"
valPV = DataTable("Formula", dtLocalSheet)

DataTable("Formula", dtLocalSheet) = "=PMT(10, 48," & valPV &")"
valPMT = DataTable("Formula", dtLocalSheet)
Print "PV: " & valPV
Print "PMT: " & valPMT
'''-------------------------------------------------------------
Hope, this would help you! Smile

Thanks,


RE: Calling Financial Functions - Raj20091 - 11-04-2009

That should do it. I will try it out. Thanks!