Excel: Can't Use Metric Measurements with PAGE.SETUP()

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).

REFERENCES

"User's Guide 1," pages 530-531 "Function Reference," pages 312-314


Additional reference words: 4.00 4.00a localize localized standard
Keywords : kbmacro kbprb kbprg kbprb
Version : 3.00 4.00 4.00a
Platform : WINDOWS


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: June 30, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.