Microsoft KB Archive/102982

{| = Excel: Can't Use Metric Measurements with PAGE.SETUP =
 * width="100%"|

Last reviewed: June 30, 1997

Article ID: Q102982

The information in this article applies to:
 * Microsoft Excel for Windows, versions 3.0, 4.0, and 4.0a

SUMMARY
In Microsoft Excel for Windows, the PAGE.SETUP macro command will present the margin arguments in English (inch) measurements regardless of the measurement setting selected under the International Settings section in Windows Control Panel. This may cause larger print margins than expected when using metric measurements.

MORE INFORMATION
The PAGE.SETUP function allows you to control Page Setup options such as orientation and margin settings from a Microsoft Excel macro. However, this command always presents its arguments for margin settings in English measurements regardless of the measurement settings in Windows Control Panel. This may result in larger print margins being set on the document when working with the metric measurement setting.

For example, the following macro

=PAGE.SETUP(,,2,2,2,2) =RETURN will correctly set left, right, top, and bottom margins to 2 inches when using English measurements in the Windows Control Panel. However, if the intention was to set the margins at 2 centimeters, the macro will set your margins to 5.1 centimeters (2 inches roughly equals 5.1 centimeters).

WORKAROUND
When you use the PAGE.SETUP macro command with metric measurements, enter the margins arguments in the inches equivalent for the centimeter settings you require.

For example, the following macro

=PAGE.SETUP(,,0.787,0.787,0.787,0.787) =RETURN will set left right top, and bottom margins to 2 centimeters when using metric measurements in Windows Control Panel (0.787 Inches roughly equals 2 Centimeters).