Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Grouping Checkboxes

You can hide the groupboxes using a line of VBA code:

Select the worksheet with the optionbuttons (and groupboxes)
Hit alt-f11 to get to the VBE (where macros and UserForms live)
hit ctrl-g to see the immediate window
Type this and hit enter
activesheet.groupboxes.visible = false

When you want to see them again, do the same thing, but change that False to
True.
Then close the VBE window and go back to excel to see if it worked ok.

If the layout of the optionbuttons is "nice", you may want to look at this page
on Debra Dalgleish's site:
http://contextures.com/xlForm01.html

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

tracktor wrote:

I have played around with the OptionButtons on the forms toolbar and they
work how I want them to but the group box is visible and in the way,
therefore unless I can hide the group box then I dont want to use them, but
I was playing around with the OptionButtons on the control toolbox, and
apparently they need some code to make them work and group together. Can you
walk me through this?

"Rick Rothstein (MVP - VB)" wrote:

I'm not sure grouping the CheckBoxes will control them in the same way that
grouping OptionButtons from the Forms toolbar does; but there is a GroupBox
object on the Forms toolbar that when placed around two or more
OptionButtons restricts the selections to among those grouped OptionButtons
no matter how many other OptionButtons are placed on the worksheet or within
other GroupBoxes. You can try that and see if it will do the same for your
CheckBoxes, but my thinking is it will not (as I said, you are using the
wrong tool for what you are wanting to do). The only other way to do what
you want is strictly through code (lot's of If-Then filtering statements I
presume).

Rick


"tracktor" wrote in message
...
I began using checkboxes when I first started creating this workbook, only
to
find out later that it was going to be a problem if the user selected more
then one checkbox. However, now I have well over 100 checkboxes on 1
worksheet that are linked to 100's of cells in other worksheets.

I got the checkboxes from the Forms Toolbar

"Rick Rothstein (MVP - VB)" wrote:

Why are you using CheckBoxes instead of OptionButtons? OptionButtons have
the functionality you want built-in whereas you will have to create code
to
duplicate the functionality if you use CheckBoxes. Next question... where
did you get your CheckBoxes (or OptionButtons if you decide to go with my
suggestion) from... the Forms toolbar or the Visual Basic toolbar?

Rick


"tracktor" wrote in message
...
I have checkboxes on my worksheet that need to be grouped together. If
there
are 2 or more checkboxes I only want 1 of them to be checked, and the
other(s) to be unchecked.. In other words if 1 checkbox value is true,
I
want
the others in the group to be false.





--

Dave Peterson
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
checkboxes helpless101 Excel Worksheet Functions 0 April 10th 06 11:54 AM
Checkboxes Randy L Excel Discussion (Misc queries) 3 February 22nd 06 08:09 PM
CheckBoxes Laur Excel Discussion (Misc queries) 2 March 22nd 05 07:40 PM
Checkboxes Es Excel Discussion (Misc queries) 1 March 14th 05 02:07 PM
Checkboxes chuck Excel Discussion (Misc queries) 1 January 25th 05 03:48 AM


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