Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Select multiple sheets on a dinamic context

Hi, I've built a model in which the user is able to add new sheets and
I'd like to make a print macro that selects only certain sheets. The
catch is that there are certain sheets which I don't want to print and
there will be new sheets (added by the user) that should be printed...
How could I do this?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 373
Default Select multiple sheets on a dinamic context

You could use an array, like so:

Sub PrintSome()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets(Array("Sheet1", "Sheet3"))
ws.PrintOut
Next ws
End Sub

James

"bliten_bsas" wrote in message
ps.com...
Hi, I've built a model in which the user is able to add new sheets and
I'd like to make a print macro that selects only certain sheets. The
catch is that there are certain sheets which I don't want to print and
there will be new sheets (added by the user) that should be printed...
How could I do this?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 469
Default Select multiple sheets on a dinamic context

was sure surprised to run into this. Just down my alley.
useing this code I have many sheets some named others numbered. should the
numbered sheets be refered to by number only? not as "sheet1" only "1".
Anyway I will start and see what happens
Thanks

"Zone" wrote:

You could use an array, like so:

Sub PrintSome()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets(Array("Sheet1", "Sheet3"))
ws.PrintOut
Next ws
End Sub

James

"bliten_bsas" wrote in message
ps.com...
Hi, I've built a model in which the user is able to add new sheets and
I'd like to make a print macro that selects only certain sheets. The
catch is that there are certain sheets which I don't want to print and
there will be new sheets (added by the user) that should be printed...
How could I do this?




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
Why when I select multiple sheets they are not highlighted in 07? jeffw Excel Discussion (Misc queries) 0 March 26th 08 06:27 PM
Select Multiple Sheets from Menu Susan Excel Programming 2 March 28th 07 02:51 AM
Select Multiple Sheets from Menu Susan Excel Programming 0 March 25th 07 05:40 PM
How to select multiple sheets in VBA? hideki[_23_] Excel Programming 4 December 10th 05 04:08 AM
Select Multiple sheets Steve Excel Discussion (Misc queries) 1 October 7th 05 06:14 PM


All times are GMT +1. The time now is 06:18 PM.

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

About Us

"It's about Microsoft Excel"