Locking Checkboxes

LSpliff

New Member
Joined
Dec 19, 2005
Messages
8
I have 1 check box that locks and unlocks a range. Inside that range I have additional checkboxes that I want locked down with the range. How does one do this? =oP

Here's what I have, so you know:

Private Sub CheckBox1_Click()
If CheckBox1.Value = True Then
ActiveSheet.Unprotect
Range("A11:J23").Locked = False
Range("A11:J23").Interior.ColorIndex = 0
ActiveSheet.Protect
Else
ActiveSheet.Unprotect
Range("A11:J23").Locked = True
Range("A11:J23").Interior.ColorIndex = 15
ActiveSheet.Protect
End If
End Sub
 

Some videos you may like

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.

BrianB

Well-known Member
Joined
Feb 17, 2003
Messages
8,127
Something like this :-
Code:
Private Sub CheckBox1_Click()
    If CheckBox1.Value = True Then
        CheckBox2.Enabled = False
    End If
End Sub
 

Watch MrExcel Video

Forum statistics

Threads
1,118,030
Messages
5,569,757
Members
412,289
Latest member
Kingchaos64
Top