Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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("A1:P40").Interior.ColorIndex = xlNon ..PrintOu ..Range("A5:B5,C6:P9,O10:O11,M10:M11,K10:K11,I10:I 11,G10:G11,E10:E11,A10:C11,C12:P12,O16,M16,K16,I16 ,G16,E16,A16:C16,A17:P33,O34:P40,A34:B40").Interio r.ColorIndex = 2 End Wit Application.EnableEvents = Tru Application.ScreenUpdating = Tru End I End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Cannot see cell shading on the screen, only in print preview | Excel Discussion (Misc queries) | |||
Conditional Cell Shading (based on the shading of other cells) | Excel Worksheet Functions | |||
Why do the colors or shading only show up in print preview in Exce | New Users to Excel | |||
My shading is hidden. I can only view it in print preiview. | Excel Discussion (Misc queries) | |||
When shading cells using the 'pattern' option, they print in grey. | Excel Discussion (Misc queries) |