XL98: Setting WindowState Property Generates the Wrong Error

Last reviewed: February 3, 1998
Article ID: Q176496
The information in this article applies to:
  • Microsoft Excel 98 Macintosh Edition

SYMPTOMS

The error message that is generated when you attempt to set the WindowState property is not correct. Using Microsoft Excel 98, the following error message is generated:

   Run-Time error '1004':
   Unable to set the WindowState property of the Window class.

CAUSE

This error message will be generated when you attempt to set the WindowState property to the constant "xlMinimized," which has a numeric value of -4140.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

The error message that should be generated in this case is:

   Run-Time error '1005':
   Command not available in Microsoft Excel for the Macintosh.

You cannot set the WindowState property to xlMinimized when you are using Excel for the Macintosh.

REFERENCES

For more information about using the WindowState property, click the Office Assistant while in the Visual Basic Editor, type "windowstate," click Search, and then click to view "WindowState Property."

NOTE: If the Assistant is hidden, click the Office Assistant button on the Standard toolbar. If Microsoft Excel Help is not installed on your computer, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q124809
   TITLE     : How to Add/Remove a Single Office for Mac Program or
               Component


Additional query words: XL98 incorrect vbe vba
Keywords : kberrmsg kbprg
Version : MACINTOSH:98
Platform : MACINTOSH
Issue type : kbbug
Solution Type : Info_Provided


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: February 3, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.