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: 1
Default Selecting worksheets into groups?

How can I use VBA code to add worksheets to or subtract worksheets from
groups?

The problem occurs when users select several sheets for printing, when some
of the sheets are not to be printed. I would like to remove one or more
sheet from group before print dialog shows.

I'm fine with a solution making me dissolve the entire group and then
building the correct group, but cant get it to work.

Have found code that let me create a group from scratch:
This works:
Sheets(Array("Week_01", "Week_02")).Select

But this doesn't:
MyString = """ & "Week_01" & """, """ & "Week_02" & """
Sheets(Array(MyString)).Select

Conclusion this far:
Hardcoding the array works but making it flexible is hard.


 
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
Excel 2007 - change shading when selecting groups of cells [email protected] Excel Discussion (Misc queries) 1 April 7th 08 03:58 AM
selecting cell groups and locking up Bugged by Excel? Excel Discussion (Misc queries) 3 August 4th 05 01:07 PM
Selecting WorkSheets Jordan Excel Programming 3 February 25th 05 07:10 PM
Selecting in groups within a sort shawb Excel Programming 1 September 8th 04 01:29 PM
selecting worksheets Matthew Kramer Excel Programming 1 August 16th 04 10:39 PM


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

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"