Excel VBA - using yearfrac function in VBA

  • Thread starter Thread starter dannyboy
  • Start date Start date
D

dannyboy

Hi
I checked the Analysis ToolPak box and Analysis ToolPak-VBA box in
Add-In dialog box in order to use the yearfrac function in VBA code.
However, I have hard to time to call the function in VBA environment;
in other word, I can not write a VBA program using the yearfrac
function! How can I use the function in VBA?

Thank you for your help

Dan
 
Dan,

You first have to load the Analysis TookPak - VBA add-in, as you
have already done. Then, in the VBA Editor, go to the Tools menu,
choose References, and add a reference to ATPVBAEN.xla. Once
you've done this, you can use the functions in the ATP as if they
were built-in VBA functions.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Back
Top