XL98: Error Running Macro That Recorded Data Analysis Tools

ID: Q192642


The information in this article applies to:
  • Microsoft Excel 98 Macintosh Edition


SYMPTOMS

When you run a macro that was created by recording one of the Data Analysis tools, you receive the following error message:

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.


CAUSE

This error message occurs when you run a macro that was created by recording any of the following Data Analysis tools contained in the Analysis Toolpak:


   Anova: Single Factor
   Anova: Two-Factor With Replication
   Anova: Two-Factor Without Replication
   Correlation
   Covariance
   Descriptive Statistics
   Exponential Smoothing
   F-Test Two-Sample for Variances
   Fourier Analysis
   Histogram
   Moving Average
   Random Number Generation
   Rank and Percentile
   Regression
   Sampling
   t-Test: Paired Two Sample for Means
   t-Test: Two-Sample Assuming Equal Variances
   t-Test: Two-Sample Assuming Unequal Variances
   z-Test: Two Sample for Means 


WORKAROUND

To correct this problem, after you record the macro, change the line in the macro that refers to the Atpvbaen.xla file. In every case, no matter which of the analysis tools you use, you need to change the reference Atpvbaen.xla to 'Analysis Toolpak - VBA'.

For example, when Excel records the following statement for the Histogram tool


   Application.Run "ATPVBAEN.XLA!Histogram", ActiveSheet.Range _
     ("$A$1:$A$4"), ActiveSheet.Range("$E$1"), ActiveSheet.Range _
     ("$B$1:$B$3"), False, False, False, False) 
you would change Atpvbaen.xla to 'Analysis Toolpak - VBA' as follows:

   Application.Run "'Analysis Toolpak - VBA'!Histogram", _
     ActiveSheet.Range("$A$1:$A$4"), ActiveSheet.Range("$E$1"), _
     ActiveSheet.Range("$B$1:$B$3"), False, False, False, False) 
Notice the leading apostrophe before the word Analysis, the trailing apostrophe after the word VBA and the spaces around the hyphen.


STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.


MORE INFORMATION

Microsoft Excel includes data analysis tools, called the Analysis Toolpak, that you can use to develop statistical and engineering analyses. To see a list of the available analysis tools included in the Analysis Toolpak, click Data Analysis on the Tools menu.


REFERENCES

For more information about the Analysis Toolpak, click Contents And Index on the Help menu (or on the Balloon Help menu if you are using a version of the Macintosh operating system earlier than 8.0), click the Index button in Excel Help, type the following text

analysis toolpak, overview
and then click Show Topics. Select the "Ways to analyze statistics" topic, and click Go To. If you are unable to find the information you need, ask the Office Assistant.

Additional query words: XL98

Keywords : kberrmsg kbmacro kbdta
Version : MACINTOSH:98
Platform : MACINTOSH
Issue type : kbbug


Last Reviewed: August 5, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.