Using a "Data Analysis" add-in function in a macro

H

hawkeyes2002

I've been trying to create a macro that runs the "Rank and Percentile
function included in the "Data Analysis" add-in. However, every time
run the macro I get an error message saying:

Run-time error '1004':

'ATPVBAEN.XLA' could not be found. Check the spelling of the fil
name, and verify that the file location is correct.

If you are trying to open the file from your list of most recently use
files on the File menu, make sure that the file has not been renamed
moved, or deleted.


- The macro is stored in the same workbook that has the data I'm tryin
to run the analysis on.

- My version of Excel is whatever comes with Office XP Pro, I thin
Excel 2002.

Any help is appreciated
 
T

Tom Ogilvy

go into Tools=>Addins and select Analysis Tookpak - VBA

this should load ATPVBAEN.XLA

Then you have to use Application.run to run the code, or create a reference
from you workbook to ATPVBAEN.xla and then you can call it like a native
function (not worksheet function, like a vba function).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top