tags:

views:

119

answers:

3

How do I print only certain tabs in an Excel file.

+2  A: 

From the UI - go to the desired worksheet and go to File -> Print

From VBA -

Call Worksheets("MySheet").PrintOut

or

Call MySheet.PrintOut

or if you have a more than one

Dim shts As New Collection
Call shts.Add(Sheet1)
Call shts.Add(Sheet3)
Call shts.Add(Sheet5)

Dim sht As Worksheet: For Each sht In shts
    Call sht.PrintOut
Next sht
AdamRalph
A: 

Click on the worksheet you want to print, select print and under print click 'active sheet'.

Full details here - MS Office Help Page for Excel printing.

Neosionnach
'Active sheet' is the default selection
AdamRalph
You can also Ctrl-left-click or Shift-left-click on the tab names to group the sheets before printing
barrowc
A: 

It works as an array too:


Thisworkbook.Sheets(array("Sheet1", "Sheet3", "Sheet5")).Printout

or:

Dim arString(1 to 3) as string

arString(1) = "Sheet1"
arString(2) = "Sheet3"
arString(3) = "Sheet5"

Thisworkbook.Sheets(arString).Printout

Either way would work.

JustPlainBill