Calling Analysis Add-in Funciton in VB

R

rvalente

I wrote a macro which needs to call the yieldmat financial function fro
excel but for some reason it just doesn't seem to be recognizing it an
I get an error. In general how do you call an add-in function from th
vb environmen
 
F

Frank Kabel

Hi
Set a reference to the Analysis toolpak, APTVBAEN.XLA and then simply
call the functions like
x = yieldmat(...)
 
N

Norman Harker

Hi rvalente!

Set a reference to the Analysis toolpak add-in in the VBA Editor using

Tools > References.
Check "atpvbaen.xls"

If you don't see it in the list you need to go back to Excel and use:

Tools > Addins
Check "Analysis ToolPak - VBA"
Now back to the VBE and
Tools > References
Check "atpvbaen.xls"

After this you just use the functions in your VBA code


--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
[email protected]
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
Top