ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using a "Data Analysis" add-in function in a macro (https://www.excelbanter.com/excel-programming/282124-using-data-analysis-add-function-macro.html)

hawkeyes2002

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

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

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com


Tom Ogilvy

Using a "Data Analysis" add-in function in a macro
 
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).

--
Regards,
Tom Ogilvy

hawkeyes2002 wrote in message
...

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 I
run the macro I get an error message saying:

Run-time error '1004':

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

If you are trying to open the file from your list of most recently used
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 trying
to run the analysis on.

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

Any help is appreciated.


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/





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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com