josephll
Board Regular
- Joined
- Nov 8, 2008
- Messages
- 51
I am sure the answer to this is simple, but it is beyond my capability.
I am trying to print several sheets from a work book, this I have done, but I want them to print in B&W. Each sheet has color in the cell. I can get rid of the color and print the first sheet but for each instance the code I have reprints the first sheet.
Here is what I have.
What I have used to print the sheets I want without formating is
Any insight would appreciated.
I am trying to print several sheets from a work book, this I have done, but I want them to print in B&W. Each sheet has color in the cell. I can get rid of the color and print the first sheet but for each instance the code I have reprints the first sheet.
Here is what I have.
HTML:
Private Sub CommandButton2_Click()
Dim sum As Object
Dim u1 As Object
Dim u2 As Object
Dim u3 As Object
Dim coal As Object
Dim env As Object
Dim printsheet As Variant
Set sum = Worksheets("Summary")
Set u1 = Worksheets("Unit 1")
Set u2 = Worksheets("Unit 2")
Set u3 = Worksheets("Unit 3")
Set coal = Worksheets("Coal")
Set env = Worksheets("Environmental")
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
With sum
.Range("B2:T73").Interior.ColorIndex = xlNone
PrintOut
Range("B2:T73").Interior.Color = RGB(204, 255, 255)
End With
With u1
.Range("B2:T147").Interior.ColorIndex = xlNone
PrintOut
Range("B2:T147").Interior.Color = RGB(204, 255, 255)
End With
With u2
.Range("B2:T147").Interior.ColorIndex = xlNone
PrintOut
Range("B2:T147").Interior.Color = RGB(204, 255, 255)
End With
With u3
.Range("B2:T147").Interior.ColorIndex = xlNone
PrintOut
Range("B2:T147").Interior.Color = RGB(204, 255, 255)
End With
With coal
.Range("B1:K40").Interior.ColorIndex = xlNone
PrintOut
Range("B1:K40").Interior.Color = RGB(204, 255, 255)
End With
With env
.Range("B1:J72").Interior.ColorIndex = xlNone
PrintOut
Range("B1:J72").Interior.Color = RGB(204, 255, 255)
End With
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
What I have used to print the sheets I want without formating is
HTML:
Private Sub CommandButton2_Click()
Dim sum As Object
Dim u1 As Object
Dim u2 As Object
Dim u3 As Object
Dim coal As Object
Dim env As Object
Dim printsheet As Variant
Set sum = Worksheets("Summary")
Set u1 = Worksheets("Unit 1")
Set u2 = Worksheets("Unit 2")
Set u3 = Worksheets("Unit 3")
Set coal = Worksheets("Coal")
Set env = Worksheets("Environmental")
sum.PrintOut
u1.PrintOut
u2.PrintOut
u3.PrintOut
coal.PrintOut
env.PrintOut
End Sub