Syntax

expression.PrintErrors

expression A variable that represents a PageSetup object.

Remarks

XlPrintErrors can be one of these XlPrintErrors constants.
xlPrintErrorsBlank
xlPrintErrorsDash
xlPrintErrorsDisplayed
xlPrintErrorsNA

Example

In this example, Microsoft Excel uses a formula that returns an error in the active worksheet. The PrintErrors property is set to display dashes. A Print Preview window displays the dashes for the print error. This example assumes a printer driver has been installed.

Visual Basic for Applications
Sub UsePrintErrors() Dim wksOne As Worksheet Set wksOne = Application.ActiveSheet ' Create a formula that returns an error value. Range("A1").Value = 1 Range("A2").Value = 0 Range("A3").Formula = "=A1/A2" ' Change print errors to display dashes. wksOne.PageSetup.PrintErrors = xlPrintErrorsDash ' Use the Print Preview window to see the dashes used for print errors. ActiveWindow.SelectedSheets.PrintPreview End Sub
print print errors printerrors printerrors property

See also: