Microsoft KB Archive/99069

{|
 * width="100%"|

XL: PRINT? Macro Function Ignores From and To Arguments

 * }

-

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 &quot;1&quot; (without the quotation marks) for this argument.

-and-
 * To print a specified range, type &quot;2&quot; (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: 4.00a XL3 XL4

Keywords : kbprint xlprint

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

Technology :