ID: Q168563
The information in this article applies to:
When you print multiple worksheets in Microsoft Excel 97, multiple print jobs may be generated. This may cause one or more of the following problems to occur:
As a result, more than one output file is generated. Each file contains part of the complete printout.
These problems occur if you use different print quality settings to print the worksheets. When you print multiple worksheets in Microsoft Excel 97, each change in the print quality setting forces Microsoft Excel to create a new print job using that print quality setting.
NOTE: These problems do not occur when you print the same worksheets in earlier versions of Microsoft Excel.
To work around this problem, make sure that all of the worksheets you are printing use the same print quality settings. You can do this manually or you can use a Visual Basic macro to change the print quality.
Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact the Microsoft fee-based consulting line at (800) 936-5200. For more information about the support options available from Microsoft, please see the following page on the World Wide Web:
http://www.microsoft.com/support/supportnet/refguide/
The following Visual Basic macro ensures that all worksheets in a workbook
use the same print quality settings:
Sub SetPrintQuality()
For Each xSheet In ActiveWorkbook.Sheets
xSheet.PageSetup.PrintQuality = 600
Next xSheet
End Sub
This macro assumes that your printer is capable of printing at 600 dots per
inch (dpi). If your printer cannot print at this resolution, change the
value in the third line of the macro to an appropriate value for your
printer (for example, 150, 300, 600, or 1200).
After you run this macro, all of the worksheets use the same print quality setting, and the problem no longer occurs.
Microsoft has confirmed this to be a problem in Microsoft Excel 97 for Windows. This problem was corrected in Microsoft Excel 97 for Windows, Service Release 1.
The following steps demonstrate the problem:
1. In Microsoft Excel 97, create a new workbook that contains three
worksheets, for example, Sheet1, Sheet2, and Sheet3.
2. In each worksheet, enter the following values:
Sheet1:
A1: Sheet1 - 300 DPI
Sheet2:
A1: Sheet2 - 600 DPI
Sheet3:
A1: Sheet3 - 300 DPI
3. Click Sheet1. On the File menu, click Page Setup, and then click the
Page tab. In the Print Quality list, click "300 dpi" and click OK.
4. Repeat step 3 for Sheet2 and Sheet3, setting the Print Quality to "600
dpi" and "300 dpi" respectively.
Note that each worksheet uses a different print quality than the
worksheet that precedes it.
5. Right-click the sheet tab for Sheet1. On the shortcut menu, click
Select All Sheets.
6. On the File menu, click Print. In the Printer section of the Print
dialog box, click to select the Print To File check box. Then, click OK.
One of the following problems occurs:
Additional query words: XL97 worksheets chart sheets charts printtofile
Keywords : kbprint
Version : WINDOWS:97
Last Reviewed: May 17, 1999