Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default printing selected sheets


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

--
funkymonkU
-----------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...fo&userid=1813
View this thread: http://www.excelforum.com/showthread.php?threadid=54942

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default printing selected sheets

Funky,

Try something like this:

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

Rgrds

Giles

"funkymonkUK" wrote:


Hi

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

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

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

but it doesn't seem to work.


--
funkymonkUK
------------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...o&userid=18135
View this thread: http://www.excelforum.com/showthread...hreadid=549426


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default printing selected sheets


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?


--
funkymonkUK
------------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...o&userid=18135
View this thread: http://www.excelforum.com/showthread...hreadid=549426

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default printing selected 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.


"funkymonkUK" wrote:


Hi

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

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

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

but it doesn't seem to work.


--
funkymonkUK
------------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...o&userid=18135
View this thread: http://www.excelforum.com/showthread...hreadid=549426


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default printing selected sheets

There are a few one liners here
http://www.rondebruin.nl/print.htm#Print

--
Regards Ron De Bruin
http://www.rondebruin.nl



"funkymonkUK" wrote in message
...

Hi

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

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

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

but it doesn't seem to work.


--
funkymonkUK
------------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...o&userid=18135
View this thread: http://www.excelforum.com/showthread...hreadid=549426





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing Selected worksheets but exclude the sheet "Sheets" Dolphinv4 Excel Discussion (Misc queries) 1 January 3rd 08 12:13 PM
Printing selected sheets. Rafat Excel Worksheet Functions 1 June 9th 06 03:13 PM
How to repeat a code for selected sheets (or a contiguous range of sheets) in a Workbook? Dmitry Excel Worksheet Functions 6 March 29th 06 12:43 PM
Having trouble printing selected sheets in Excel lost in the world Excel Discussion (Misc queries) 1 April 26th 05 06:24 PM
printing selected sheets andy Excel Programming 2 December 8th 04 09:59 PM


All times are GMT +1. The time now is 02:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"