Excel: Printing Chart after Page.Setup?() Macro Causes Error

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

SUMMARY

In version 4.0 of Microsoft Excel for Windows, an error message will occur when you print a chart after you run a macro that contains the Page.Setup?() macro function. This problem only occurs if you print the chart by selecting the Print button in the Page Setup dialog box after you run the macro.

NOTE: If you do not specify any of the optional arguments in the Page.Setup?() function, the error message will not occur.

Workaround

To keep this error message from occurring, use the following two macro functions:

  • Page.Setup?()

    -and-

  • Page.Setup() function

To use these functions:

  1. Specify your arguments using the Page.Setup() function.

  2. Use the Page.Setup?() function without any arguments to display the Page Setup Dialog box.

For example, to set the filename to print in the header and to display the Page Setup Dialog box, you would use the following syntax:

   =PAGE.SETUP("&F")
   =PAGE.SETUP?()

If you choose the Print button in the displayed dialog box you will not receive an error message.

REFERENCES

"Microsoft Excel Function Reference," version 4.0, pages 312-314


KBCategory: kbprint
KBSubcategory:

Additional reference words: 4.00 4.0



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.