XL5: Recorded Object Position Incorrect on Zoomed Worksheet

Last reviewed: September 12, 1996
Article ID: Q116391
The information in this article applies to:
  • Microsoft Excel for Windows, version 5.0

SYMPTOMS

In Microsoft Excel, when you start the macro recorder and create a drawing object, such as a line or rectangle, the object is not placed in the same location if you run the recorded macro on a worksheet with a different zoom percentage.

CAUSE

When you create a macro that creates a drawing object on a worksheet, either by recording or editing the macro, rounding errors occur in the coordinate calculations when you play the macro back on a worksheet at a different zoom factor. The rounding error may be as much as one pixel per row, and is therefore more noticeable with larger drawing objects.

WORKAROUND

To avoid this problem when you run a macro that creates a drawing object, make sure that the worksheet is at the same zoom percentage as when you recorded or created the macro. You can use the Zoom property of the Window object in your Visual Basic macro such that it sets the zoom percentage on the worksheet before it creates the object.

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.


KBCategory:
KBSubcategory:

Additional reference words: 5.00 5.00a



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