Checkboxes with the same Group Name not Responding

R

RyanH

I have 4 Checkboxes in a UserForm. I have given all 4 Checkboxes the
GroupName = "Shipping" in the Properties Window in the VBA Editor. We I Show
the UserForm and click on one Checkbox the others do not turn off, why?

Thanks in Advance,
Ryan
 
D

Dave Peterson

That's the way checkboxes work.

Maybe you meant to use OptionButtons -- they'll only allow one option to be
chosen in each group.
 
J

Joel

You can make a check box look like an option button by deselecting the other
boxes when one comes true


Private Sub CheckBox2_Click()
if checkbox2 = true then
checkbox1 = false
checkbox 3 = false
end if
End Sub
 
R

RyanH

I could use option buttons, but I would prefer the look of the checkboxes.
The help section says the GroupName Property supports option buttons, but why
does the GroupName property show up in the Properties window of the VBE? Am
I wrong about the possiblity of the checkboxes acting like option buttons?

Ryan
 
J

Joel

Groupname doesn't make check boxes mutually exclusive. It just creates a
common group if any of the boxes are selected.
 
D

Dave Peterson

Just to add to what Joel wrote...

It's not always what the developer thinks looks nice. As a user, I would expect
checkboxes to be independent of each other -- and grouped optionbuttons to be
mutually exclusive.

If the developer doesn't follow those rules, it can be more confusing to the
user.
 
D

Dave Peterson

I wouldn't want to clutter my userforms with stuff like that.

I wouldn't want to use Tools|Options and see instructions on each tab explaining
how checkboxes should be used.

I wouldn't expect most users to read these kinds of instructions, either.
Adding instruction on the userfrom to "Select One" will eliminate the
confussion
 
R

RyanH

I would agree with that. I switched to option buttons and everything is great!

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top