LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Printing Worksheets (Array)

Need some help printing Worksheets. I have a Workbook that can contain
varying amount of Worksheets. Currently I count the sheets of a particular
type and based on that count (x) I store the sheet.names in strings s1 to
s10 then select the Case below based on x:

Select Case X
Case 1
Worksheets(Array(s1, "Terms1", "Terms2")).Select
Case 2
Worksheets(Array(s1, s2, "Terms1", "Terms2", ss)).Select
Case 3
Worksheets(Array(s1, s2, s3, "Terms1", "Terms2", ss)).Select
Case 4
Worksheets(Array(s1, s2, s3, s4, "Terms1", "Terms2", ss)).Select

Currently I have this built out to 10 and works fine but the requirement
has grown and I hate to use this long method.

Is there a way to automatically build this Array, i.e., if x was 25, it
would automatically build the above from S1 to S25?

Or is this just a stupid way of doing this and there is a much easier way
to print the sheets you want?

Thanks, Rob
 
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
Building an array of worksheets for printing DRK Excel Programming 5 August 30th 05 01:56 AM
Array Printing (Selecting) Craig[_21_] Excel Programming 1 December 31st 04 07:51 AM
printing an array of worksheets Marco de Witte Excel Discussion (Misc queries) 4 December 8th 04 03:21 PM
Printing? Worksheets not printing the same on multiple pc's! 43fan Excel Programming 2 April 29th 04 02:34 PM
Sheets(array) method for printing grouped worksheets Tom Ogilvy Excel Programming 0 July 17th 03 09:11 PM


All times are GMT +1. The time now is 05:53 PM.

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"