XL5: Run Time Error with QueryGetData or QueryGetDataDialogLast reviewed: September 12, 1996Article ID: Q136315 |
The information in this article applies to:
SYMPTOMSIn Microsoft Excel, you may receive the following error message if you run a macro that uses either the QueryGetData or the QueryGetDataDialog in Microsoft Excel version 5.0:
Run-time error '1003' "Invalid Number of Arguments"These XLQUERY.XLA add-in functions
CAUSEIn Microsoft Excel 5.0, there was not an option to save your password with a query when using "Get External Data" from the Data menu. This feature was added in Microsoft Excel version 5.0c. Likewise, in Microsoft Excel version 5.0c, the XLQUERY.XLA add-in functions QueryGetData and QueryGetDataDialog acquired an additional argument called "KeepPassword" to determine whether or not the password should be saved with the query in your workbook.
MORE INFORMATIONThe syntax for these functions in Microsoft Excel versions 5.0 is:
QueryGetData(ConnectionStr, QueryText, KeepQueryDef, FieldNames, RowNumbers, Destination, Execute) QueryGetDataDialog(ConnectionStr, QueryText, KeepQueryDef, FieldNames, RowNumbers, Destination, Execute)The syntax for these functions in Microsoft Excel version 5.0c is:
QueryGetData(ConnectionStr, QueryText, KeepQueryDef, FieldNames, RowNumbers, Destination, Execute, KeepPassword) QueryGetDataDialog(ConnectionStr, QueryText, KeepQueryDef, FieldNames, RowNumbers, Destination, Execute, KeepPassword)If you run a macro that uses the eighth argument ("KeepPassword") in Microsoft Excel 5.0 (not the "c" release), you may receive the error message "Invalid Number of Arguments" when the macro is run. You will not receive this error in Microsoft Excel 5.0c.
REFERENCESFor additional information, please see the following article(s) in the Microsoft Knowledge Base:
ARTICLE-ID: Q118754 TITLE : XL5: No Option to Save/Not Save Password with MSQuery Add-in |
KBCategory: kbtool
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |