XL5: Run-time Error 1004 or 1006 Using ATP Worksheet FunctionLast reviewed: September 12, 1996Article ID: Q119001 |
The information in this article applies to:
SYMPTOMSIn Microsoft Excel, when you use one of the Analysis ToolPak worksheet functions, one of the following occurs:
CAUSEThese symptoms occur if the workbook that contains the function also contains a module sheet that references the Analysis ToolPak -- Visual Basic for Applications add-in file, ATPVBAEN.XLA. The error messages occur when you use one of the following worksheet functions:
EDATE() EOMONTH() IMSUM() NOMINAL() TBILLEQ() TBILLPRICE() TBILLYIELD()You receive the run-time error '1004' if the Analysis ToolPak-Visual Basic for Applications add-in is also loaded (selected in the Add-ins dialog box). If the Analysis ToolPak-Visual Basic for Applications is not loaded, you receive the run-time error '1006.' Note that the functions IMSUM() and NOMINAL() return the #VALUE! error value if the Analysis ToolPak--VBA add-in is not loaded. The following functions return the #VALUE! error value whether the Analysis ToolPak-Visual Basic for Applications add-in is loaded or not:
GCD() LCM() MULTINOMIAL() IMPRODUCT() CUMIPMT() CUMPRINC()Note that this behavior also occurs if you use the FunctionWizard to insert the function.
WORKAROUNDTo avoid receiving these error messages when you use one of the Analysis ToolPak worksheet functions, include the reference to the add-in file with the function name as in the following examples:
=ANALYSF.XLA!EDATE("1/1/94",5) =ANALYSF.XLA!NOMINAL("1/1/94",5) STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in Microsoft Excel for Windows version 5.0c.
MORE INFORMATIONFor additional information, please see the following article(s) in the Microsoft Knowledge Base:
ARTICLE-ID: Q118797 TITLE : "Cannot Find" Using Analysis ToolPak Visual Basic Function ARTICLE-ID: Q118799 TITLE : XL5: "Argument Not Optional" Using Visual Basic ATP Functions |
KBCategory: kbtool
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |