Err Msg: "Invalid Number of Arguments" with DialogFrame

Last reviewed: September 2, 1997
Article ID: Q133328
The information in this article applies to:
  • Microsoft Excel for Windows, versions 5.0

SYMPTOMS

In Microsoft Excel, you can use the following syntax to change the caption for the dialog frame of a custom dialog box:

   DialogSheets(1).DialogFrame(1).Text="My Caption"

Although Microsoft Excel does not generate an error, this syntax is incorrect. A custom dialog box does not have a DialogFrame collection since there is only one dialog frame for each dialog box.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem has been corrected in Microsoft Excel for Windows, version 5.0c.

MORE INFORMATION

This syntax is allowed in Microsoft Excel version 5.0 for Windows. However, if this syntax is used in Microsoft Excel version 5.0c for Windows, you will receive the following error message:

   Runtime Error '1003'
   Invalid Number of Arguments

The following correct syntax should be used instead:

   DialogSheets(1).DialogFrame.Text = "My Caption"


Additional query words: 5.00
Keywords : kbprg PgmOthr kbcode kbprb
Version : 5.00
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 2, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.