MacXL: Error When You Run Macro That Recorded Data Analysis Tools (192642)
The information in this article applies to:
- Microsoft Excel 2001 for Mac
- Microsoft Excel 98 Macintosh Edition
This article was previously published under Q192642 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 the Office Assistant, type ways to analyze statistics, and then click Search to view the topics returned.
Modification Type: | Minor | Last Reviewed: | 10/10/2006 |
---|
Keywords: | kbbug kbdtacode kberrmsg kbmacro kbpending KB192642 |
---|
|