Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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...
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 109
Default 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...



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default 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...
.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default 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...


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sampling Analysis Pack Question Jamie Excel Discussion (Misc queries) 1 August 25th 09 06:19 PM
No Analysis Tool Pack=EDATE formula not working! HELP!! Danny Boy Excel Worksheet Functions 9 January 5th 09 09:50 PM
Analysis tool pack ( I do not have the disc) Dakoda Excel Discussion (Misc queries) 2 September 16th 07 01:29 AM
Working Days without the Analysis Pack sdg8481 Excel Discussion (Misc queries) 5 July 22nd 06 10:02 AM
After adding Analysis Tool Pack, still no PRICE function, why? mtburdett Excel Worksheet Functions 1 November 5th 05 09:43 AM


All times are GMT +1. The time now is 10:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"