ID: Q117133
4.00 4.00a WINDOWS
The information in this article applies to:
In Microsoft Excel versions 4.0 and 4.0a, if you turn on the macro recorder, and you use the tools on the Drawing toolbar to draw an object such as a line or polygon, when you run the macro, the size and position of the drawing depends on the zoom factor of the active sheet.
The CREATE.OBJECT() macro function has the following arguments (coordinates) that describe how to draw an object: ref1, x_offset1, y_offset1, ref2, x_offset2, y_offset2.
In Microsoft Excel versions 4.0 and 4.0a, when you use the CREATE.OBJECT() macro function to create a drawing object on a worksheet, the coordinates that you use create a different-sized object depending on the zoom factor of the worksheet.
Additionally, when you record a macro that uses the CREATE.OBJECT() macro function, the coordinates of the created object depend on the zoom factor of the worksheet. For example, if you turn on the macro recorder, and draw a horizontal line on a worksheet with a magnification factor of 100 percent, and you then draw the same horizontal line on a worksheet with a magnification factor of 200 percent, the x_offset1 and the y_offset2 values recorded for the line at 200 percent are twice those recorded at 100 percent.
To work around this behavior when you use a macro to create a drawing object on a worksheet, make sure the worksheet has the same magnification factor when you run the macro as when you created the macro. You can use the ZOOM() function in your macro before you create the object to make sure that the worksheet is at the desired magnification factor. For example, the following command restores the active worksheet to 100-percent magnification:
=ZOOM(FALSE)
This problem has been corrected in Microsoft Excel version 5.0. In Microsoft Excel version 5.0, the size of an object created on a worksheet using a macro is independent of the zoom factor of the worksheet.
For more information about using a macro to create an object on a zoomed worksheet, query on the following words in the Microsoft Knowledge Base:
zoom and position and macro and recorded
KBCategory:
KBSubcategory:
Additional reference words: 4.00 4.00a 5.00 different relative absolute
Version : 4.00 4.00a
Platform : WINDOWS
Last Reviewed: September 14, 1996