WINDOW.MOVE Returns Error Message if Window Is Maximized

Last reviewed: November 3, 1994
Article ID: Q78125
The information in this article applies to:
  • Microsoft Excel for Windows, versions 2.x, 3.0, 4.0, 5.0
  • Microsoft Excel for OS/2, versions 2.2, 2.21 and 3.0

SYMPTOMS

In Microsoft Excel, when you use the WINDOW.MOVE macro function, you receive a macro error if the active window or the window specified in the WINDOW.MOVE function is maximized.

NOTE: In versions of Microsoft Excel previous to version 4.0, the equivalent macro function is MOVE. This function has the same behavior.

WORKAROUNDS

  • To avoid receiving the error message and move the window whether it is maximized or not, use the following command in your macro before you use the WINDOW.MOVE function:

          =WINDOW.RESTORE()
    
  • To only avoid receiving the error message and not move the window when it is maximized, use the following command in your macro before you use the WINDOW.MOVE function:

          =ERROR(FALSE)
    
  • To test to see whether the active window is maximized before you use the WINDOW.MOVE function, use the following command in your macro:

          =GET.WINDOW(20)
    

    This statement returns TRUE if the window is maximized; FALSE otherwise.

MORE INFORMATION

The WINDOW.MOVE function moves the upper-left corner of a document window to a specified horizontal and vertical position. For example, the macro command, =WINDOW.MOVE(1,1) moves the upper-left corner of the active window to the position (1,1) (measured in points).

REFERENCES

"Microsoft Excel Function Reference," Version 4.0, pages 180, 207-209, and 280.

"Microsoft Excel Function Reference," Version 3.0, pages 98, 115-116, and 156-157.

"Microsoft Excel Function Reference" for Windows, Version 4.0, page 280


KBCategory: kbusage
KBSubcategory:

Additional reference words: 2.0 2.00 2.01 2.1 2.10 2.2 2.20 2.21 3.0
3.00 4.0 4.00 5.0 5.00


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