M
Matt
I have this code that removes the cell shading then prints the sheet and then places the cell shading back. However, when this code runs, the user does not get a Print dialog box so they can choose how many copies or which printer to use. I would like to modify this code so that they get the Print dailog box. How should I modify this code or is there a better way to do this? Also, if someone could explain to me what this code is doing, that would be great. Thanks in advance. Mat
Private Sub Workbook_BeforePrint(Cancel As Boolean
If ActiveSheet.Name = "TIME AND LEAVE" The
Cancel = Tru
Application.EnableEvents = Fals
Application.ScreenUpdating = Fals
With ActiveShee
Worksheets("TIME AND LEAVE").Protect UserInterfaceOnly:=Tru
..Range("A140").Interior.ColorIndex = xlNon
..PrintOu
..Range("A5:B5,C69,O10:O11,M10:M11,K10:K11,I10:I11,G10:G11,E10:E11,A10:C11,C1212,O16,M16,K16,I16,G16,E16,A16:C16,A1733,O3440,A34:B40").Interior.ColorIndex = 2
End Wit
Application.EnableEvents = Tru
Application.ScreenUpdating = Tru
End I
End Sub
Private Sub Workbook_BeforePrint(Cancel As Boolean
If ActiveSheet.Name = "TIME AND LEAVE" The
Cancel = Tru
Application.EnableEvents = Fals
Application.ScreenUpdating = Fals
With ActiveShee
Worksheets("TIME AND LEAVE").Protect UserInterfaceOnly:=Tru
..Range("A140").Interior.ColorIndex = xlNon
..PrintOu
..Range("A5:B5,C69,O10:O11,M10:M11,K10:K11,I10:I11,G10:G11,E10:E11,A10:C11,C1212,O16,M16,K16,I16,G16,E16,A16:C16,A1733,O3440,A34:B40").Interior.ColorIndex = 2
End Wit
Application.EnableEvents = Tru
Application.ScreenUpdating = Tru
End I
End Sub