XL5: Recorded Object Position Incorrect on Zoomed WorksheetLast reviewed: September 12, 1996Article ID: Q116391 |
The information in this article applies to:
SYMPTOMSIn 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.
CAUSEWhen 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.
WORKAROUNDTo 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.
STATUSMicrosoft 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:
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |