Excel: PAGE.SETUP?() Macro Error Using Fit To Array

Last reviewed: July 16, 1997
Article ID: Q97851
The information in this article applies to:
  • Microsoft Excel for Windows, versions 4.0 and 4.0a

SUMMARY

In Microsoft Excel, if you use the PAGE.SETUP?() function to define the Fit To array as one of the parameters, you will receive the following error message:

   Number is not valid

If you choose OK, you receive the following error message:

   Macro Error at Cell: Macro1!A1

However, if you use the same syntax with the PAGE.SETUP() function (note that there is no question mark), the function will work as expected (this correct behavior is described in the "Microsoft Excel Function Reference," version 4.0).

Workarounds

To work around this problem, use either of the following two procedures.

Workaround

  1. In a new macro sheet, type the following macro:

    A1: PAGE.SETUP("&F","Page &P",0.75,0.75,1,1, FALSE,TRUE,FALSE,

           FALSE, 1,1,{2,2},1,1,FALSE)
    
    A2: PAGE.SETUP?() A3: RETURN()

  2. Run the macro.

You should not receive a macro error.

REFERENCES

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


Additional query words: 4.00 4.00a
Keywords : kbprb
Version : 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: July 16, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.