printing selected sheets

  • Thread starter Thread starter funkymonkUK
  • Start date Start date
F

funkymonkUK

Hi

I have a workbook say with worksheets names from Sheet1 to sheet6. no
those exact names but just as an example.

what I want to do is select sheet1 to sheet5 and print. i thought mayb
something along the lines of

Sheet(1 - (sheets.count -1)).select
selection.print

but it doesn't seem to work
 
Funky,

Try something like this:

Sheets(Array("Sheet1", "Sheet2", "Sheet3", "Sheet4", _
"Sheet5")).Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True

Rgrds

Giles
 
this would work with my example. but i have a workbook with 46+ tabs
each with different names is there not something equilivant to
range("A1:b2") but for sheets?
 
Funky,

I did it by recording a macro - selecting the sheet tabs using the Shift and
Control keys. This does all the names bit for you (lazy!)

I guess you could do something along the lines of:

Option Explicit
Sub PrintList()

Dim ws As Worksheet

For Each ws In ActiveWorkbook.Sheets
Application.StatusBar = "Printing " & ws.Name
if ws.name <> "Sheet2" then ws.PrintOut
Next

End Sub

which will print all sheets except sheet2

or if you just want to print them all -

sheets.printout does that for you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top