I have a macro to print from sheet onwards where the value in C29 <>0
The Macro prints well, but there is a Message dialog box which is an office feature the says "Printing" and below it "Now Printing" This dialog message box appers each time a sheetis being printing
I would like to suppress this in my code
Sub PrintChequeAdvices()
Dim ws As Worksheet
Dim cell As Range
Application.DisplayAlerts = False 'suppress print message
Application.ScreenUpdating = False 'suppress screen updating
For Each ws In Worksheets
If ws.Index >= 3 And ws.Range("C29").Value <> 0 Then
With ws.PageSetup
.PrintArea = "$A$1:$E$38"
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
.Orientation = xlLandscape ' set the page orientation to Landscape
End With
For Each cell In ws.Range("A1:E38")
cell.Borders.LineStyle = xlContinuous
cell.Borders.Weight = xlThin
Next cell
ws.PrintOut Preview:=False 'print without preview
End If
Next ws
Application.DisplayAlerts = True 'enable display alerts
Application.ScreenUpdating = True 'enable screen updating
End Sub
Bookmarks