Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I add a control check box to control other checkboxes? | Excel Worksheet Functions | |||
Reset Checkboxes from Control Tool Box | Excel Programming | |||
Forms control checkboxes on charts | Excel Programming | |||
Forms control checkboxes on charts | Excel Programming | |||
Forms control checkboxes on charts | Excel Programming |