Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 98
Default Control checkboxes

Hi I have five check boxes from the control menu, these are named Checkbox1
through to 5.

When checkbox1 is unchecked I would like checkbox2 through to 5 to become
unchecked and grayed out.

When checkbox1 is ticked I would like checkbox2 through to 5 to become
active so that I can check them as required.

Hope that makes sense

Regards

Newbeetle


--
This post was created using recycled electrons!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Control checkboxes

Try:

Private Sub CheckBox1_Click()

Dim s As String
Dim c As Control
Dim lng As Long

For lng = 2 To 5

s = "CheckBox" & lng
If Me.CheckBox1.Value = True Then
Me.Controls(s).Enabled = True
Else
Me.Controls(s).Enabled = False
End If
Next

End Sub


Private Sub UserForm_Initialize()

Dim c As Control
Dim lng As Long
Dim s As String

For lng = 2 To 5
s = "CheckBox" & lng
Me.Controls(s).Enabled = False
Next

End Sub

--
---------------------------
Mauro Gamberini
http://www.riolab.org/
"Newbeetle" ha scritto nel messaggio
...
Hi I have five check boxes from the control menu, these are named
Checkbox1
through to 5.

When checkbox1 is unchecked I would like checkbox2 through to 5 to become
unchecked and grayed out.

When checkbox1 is ticked I would like checkbox2 through to 5 to become
active so that I can check them as required.

Hope that makes sense

Regards

Newbeetle


--
This post was created using recycled electrons!



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
How do I add a control check box to control other checkboxes? JGarland Excel Worksheet Functions 1 September 18th 08 12:26 PM
Reset Checkboxes from Control Tool Box Robert Excel Programming 7 August 22nd 06 05:36 AM
Forms control checkboxes on charts Tom Ogilvy Excel Programming 2 September 14th 04 12:35 AM
Forms control checkboxes on charts routeram Excel Programming 1 September 13th 04 12:38 AM
Forms control checkboxes on charts Dave Peterson[_3_] Excel Programming 1 September 13th 04 12:12 AM


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