Microsoft KB Archive/95179

{| = Excel: Printing Chart after Page.Setup? Macro Causes Error =
 * width="100%"|

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(&quot;&F&quot;) =PAGE.SETUP? If you choose the Print button in the displayed dialog box you will not receive an error message.