Need help printing

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.

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
Any insight would appreciated.
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

Forum statistics

Threads
1,216,112
Messages
6,128,901
Members
449,477
Latest member
panjongshing

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top