Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Clickbox control help needed

I would am attempting to create two clickboxes where when one is
turned On the other is turned Off automatically. No luck so far. Any
suggestions would be appreciated. Below are two of the codes I have
tried.

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

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

AND

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

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


TIA,

BrianG
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Clickbox control help needed

Why not use radio buttons (small circles) as they are designed specifically
to be mutually exclusive (only one can be selected at a time).
--
HTH...

Jim Thomlinson


"BrianG" wrote:

I would am attempting to create two clickboxes where when one is
turned On the other is turned Off automatically. No luck so far. Any
suggestions would be appreciated. Below are two of the codes I have
tried.

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

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

AND

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

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


TIA,

BrianG

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Clickbox control help needed

I'm trying to use clickboxes because the look of the clickbox on the
printed form is preferable to that of the radio button. Of course, if
I can't control the clickboxes I'll need to consider other options.


BrianG
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Clickbox control help needed

You can try this...

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

Private Sub CheckBox3_Click()
If CheckBox3.Value = True Then
CheckBox1.Value = False
CheckBox2.Value = False
End If
End Sub
--
HTH...

Jim Thomlinson


"BrianG" wrote:

I'm trying to use clickboxes because the look of the clickbox on the
printed form is preferable to that of the radio button. Of course, if
I can't control the clickboxes I'll need to consider other options.


BrianG

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Clickbox control help needed

That did it. Many thanks Jim.
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
2007 Form Control/ActiveX Control font difference Nikko963 Excel Discussion (Misc queries) 0 April 15th 09 04:21 PM
Special Control Needed - Please Advise Pflugs Excel Programming 3 July 21st 07 07:36 AM
Help needed with a RefEdit control Dan Hatola Excel Programming 2 August 16th 06 04:05 AM
Programatically control picture property of Image control Brassman[_5_] Excel Programming 5 May 24th 05 09:32 PM
Calendar Control: Can't exit design mode because control can't be created Rone Excel Programming 0 May 24th 04 04:01 PM


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