XL: PRINT?() Macro Function Ignores From and To Arguments

Last reviewed: February 2, 1998
Article ID: Q99069
The information in this article applies to:
  • Microsoft Excel for Windows, versions 2.x, 3.0, 4.0, 4.0a
  • Microsoft Excel for OS/2, versions 2.2, 3.0
  • Microsoft Excel for the Macintosh, versions 2.x, 3.0, 4.0

SYMPTOMS

In the versions of Microsoft Excel listed above, the PRINT?() macro function ignores the from and to arguments (the arguments that specify which pages to print). As a result, when you run a macro that contains this function, all of the pages in the worksheet will be printed.

For example, if you enter the following function

   =PRINT?(2,2,2,,,true)

your document should only print page 2. However, all of the pages in your document will be printed.

NOTE: In the Print dialog box, 2 is entered in From and To boxes; however, the All button remains checked.

WORKAROUND

To work around this problem, use the PRINT() function instead of the PRINT?() function. This will allow you to print only the pages you specify in the from and to arguments.

To print only page 2, use the PRINT() function (without the question mark):

   =PRINT(2,2,2,,,true)

MORE INFORMATION

The syntax for the PRINT?() macro function is as follows:

  =PRINT?(range_num,from,to,copies,draft,preview,print_what,color,feed,
   quality,v_quality)

The range_num argument specifies which pages to print:
  • To print all pages, type "1" (without the quotation marks) for this argument.

        -and-
    
  • To print a specified range, type "2" (without the quotation marks) for this argument.

NOTE: If you use 2 for this argument, then the from and to arguments are required. The from argument specifies the first page to be printed and the to argument specifies the last page to be printed.


Additional query words: 3.00 4.00 4.00a XL3 XL4
Keywords : xlprint kbprint
Version : WINDOWS:2.0,3.0,4.0,4.0a; MACINTOSH:2.0,3.0,4.0; OS/2:2.2,3.0
Platform : MACINTOSH OS/2 WINDOWS
Issue type : kbprb


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