Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Active X Checkboxes

Is there any way of making check boxes work in the same way as radio buttons,
i.e. making it possible to be able to only have one box ticked in a group.
You may say use radio buttons, but the users of the form I am constructing
would prefer to have tick boxes.
Many thanks for any assistance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 292
Default Active X Checkboxes

Hi

You can change checkbox values by code. Try this:

Private Sub CheckBox1_Click()
Me.CheckBox2.Value = Not (Me.CheckBox1.Value)
End Sub

Private Sub CheckBox2_Click()
Me.CheckBox1.Value = Not (Me.CheckBox2.Value)
End Sub

HTH. Best wishes Harald

"Holanmeg" skrev i melding
...
Is there any way of making check boxes work in the same way as radio

buttons,
i.e. making it possible to be able to only have one box ticked in a group.
You may say use radio buttons, but the users of the form I am constructing
would prefer to have tick boxes.
Many thanks for any assistance.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Active X Checkboxes

Thanks. This works for two checkboxes, but I cannot make it work for more
than two. I tried including more lines of the same code but with different
box references, under each Sub routine for three boxes.


"Harald Staff" wrote:

Hi

You can change checkbox values by code. Try this:

Private Sub CheckBox1_Click()
Me.CheckBox2.Value = Not (Me.CheckBox1.Value)
End Sub

Private Sub CheckBox2_Click()
Me.CheckBox1.Value = Not (Me.CheckBox2.Value)
End Sub

HTH. Best wishes Harald

"Holanmeg" skrev i melding
...
Is there any way of making check boxes work in the same way as radio

buttons,
i.e. making it possible to be able to only have one box ticked in a group.
You may say use radio buttons, but the users of the form I am constructing
would prefer to have tick boxes.
Many thanks for any assistance.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Active X Checkboxes

First allow me to say that this is a really silly idea. The customer wants
something to bark and scare off thieves, but dogs are ugly and smelly, so
the customer wants it to be a pussycat. So how do we teach a pussycat to
bark, and how do we make thieves afraid of them ? We require it. Customers
are not always right. But see if this works for you, the technique is useful
anyway:

Private Sub CheckBox1_Click()
If CheckBox1.Value = True Then
CheckBox2.Value = False
CheckBox3.Value = False
End If
End Sub

Private Sub CheckBox2_Click()
If CheckBox2.Value = True Then
CheckBox1.Value = False
CheckBox3.Value = False
End If
End Sub

And so on.

HTH. Best wishes Harald

"Holanmeg" skrev i melding
...
Thanks. This works for two checkboxes, but I cannot make it work for more
than two. I tried including more lines of the same code but with

different
box references, under each Sub routine for three boxes.


"Harald Staff" wrote:

Hi

You can change checkbox values by code. Try this:

Private Sub CheckBox1_Click()
Me.CheckBox2.Value = Not (Me.CheckBox1.Value)
End Sub

Private Sub CheckBox2_Click()
Me.CheckBox1.Value = Not (Me.CheckBox2.Value)
End Sub

HTH. Best wishes Harald

"Holanmeg" skrev i melding
...
Is there any way of making check boxes work in the same way as radio

buttons,
i.e. making it possible to be able to only have one box ticked in a

group.
You may say use radio buttons, but the users of the form I am

constructing
would prefer to have tick boxes.
Many thanks for any assistance.






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
Row select mode to highlight active row of active cell Bart Fay[_2_] Excel Discussion (Misc queries) 0 May 11th 10 09:34 PM
referring to formula in a non active cell from active cell nickname Excel Discussion (Misc queries) 1 June 21st 07 12:11 PM
how can I return the active row and active column? Greg Excel Programming 0 February 3rd 05 07:38 PM
HOW TO COPY 480 ACTIVE E-MAIL ADDRESSES CLM "G" ON AN ACTIVE EXCE. ragman10 Excel Discussion (Misc queries) 1 December 13th 04 11:52 PM


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