Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default Select Multiple Sheets from Menu

capp -
yes, you can do this.

go ahead & set up all the checkboxes - just keep the auto-created
names Checkbox1, Checkbox2, etc.

in your userform initialization sub, you can loop thru the checkboxes
and change the caption (what shows to the user) to the sheet names.

dim oControl as control

for each oControl in controls
if typeof oControl is msforms.checkbox then
ocontrol.caption = worksheets(1).name
end if
next oControl

hmmmmmmmm..... i'm a little lost myself. :) (relative newbie myself
6 mos or so) the above loop won't work because it will name ALL the
checkboxes the name of sheet1.
i can't see how you'd loop thru BOTH the checkboxes and the sheets;
i'm sure you can do it, but i'm on a dial-up computer here & can't
easily search the newsgroup while i'm writing this. i don't know if
you can have a "for-each" loop inside a "for-each" loop. :/

ok, alternatively, you could also do them individually....... (this
is also in the initialization sub)

checkbox1.caption = worksheets(1).name
checkbox2.caption = worksheets(2).name
checkbox3.caption = worksheets(3).name
etc.

you might need to change these to me.checkbox1 blah blah blah.
hope this helps!
if not, search the newsgroup for the problems & you'll come up with
lots of examples.
susan


On Mar 23, 4:03�pm, Capp wrote:
I have multiple worksheets in my workbook. *I have a pop-up form with
mulitple checkboxes. *I want to use this menu to to select specific sheets so
I can print them as a package. *The control source for all checkboxes are in
"data entry" worksheet. *Does someone have simple code to achieve this? *
Obviously I am a fairly new user so any help would be appreciated.

Example Sheets *-- *"Data Entry", "Title Page", "Analysis", "Chart 1",
"Chart 2" etc. * *



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
Macro to select cells without a certain value and select a menu it Guy[_2_] Excel Worksheet Functions 9 January 2nd 09 05:21 PM
Why when I select multiple sheets they are not highlighted in 07? jeffw Excel Discussion (Misc queries) 0 March 26th 08 06:27 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
in charting, how do i select data ranges from multiple sheets, sa. michael Charts and Charting in Excel 1 March 6th 05 03:01 PM


All times are GMT +1. The time now is 10:43 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"