![]() |
How can I use Analysis Toll Pack functions in VBA?
I like to build functions that calls Analysis Tool Pack
functins like YEARFRAC() and YIELD(). I have the add- in "Analysis Tool Pack - VBA" (atpvbaen.xls) and Excel 2002. I can not get it to work by using: Application.WorksheetFunctions... |
How can I use Analysis Toll Pack functions in VBA?
Torbjörn
Try this setup (here with the function MROUND()): Sub test() MsgBox Evaluate("mround(1.3, 0.2)") End Sub -- Best Regards Leo Heuser Followup to newsgroup only please. "Torbjörn Lindström" skrev i en meddelelse ... I like to build functions that calls Analysis Tool Pack functins like YEARFRAC() and YIELD(). I have the add- in "Analysis Tool Pack - VBA" (atpvbaen.xls) and Excel 2002. I can not get it to work by using: Application.WorksheetFunctions... |
How can I use Analysis Toll Pack functions in VBA?
Hi,
Presume you vant to use it in VB code: Under Tools in the VB editor select References and hook off 'atpvbaen' and 'funcres' this will give you access to the analysis toolpak. Typing for instance Random will make vb come up with required call parameters. jacob -----Original Message----- I like to build functions that calls Analysis Tool Pack functins like YEARFRAC() and YIELD(). I have the add- in "Analysis Tool Pack - VBA" (atpvbaen.xls) and Excel 2002. I can not get it to work by using: Application.WorksheetFunctions... . |
How can I use Analysis Toll Pack functions in VBA?
YEARFRAC and YIELD aren't worksheet functions. They are functions in the
Analysis Tool Pak. Worksheet functions refer to things built into Excel proper, like SUM, AVERAGE, RANK, etc, that don't require add-ins. Once you've set a reference to the ATP in your VBA project, you can call the function simply as x = Yield(.....) On Tue, 31 Aug 2004 23:31:49 -0700, Torbjörn Lindström wrote: I like to build functions that calls Analysis Tool Pack functins like YEARFRAC() and YIELD(). I have the add- in "Analysis Tool Pack - VBA" (atpvbaen.xls) and Excel 2002. I can not get it to work by using: Application.WorksheetFunctions... |
All times are GMT +1. The time now is 12:28 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com