jeudi 10 mai 2018

macro check box enabling

I have a problem running the below listed macro. My goal is, to have the Check Box 7 unebled to be clicked if the Check Box 2 is not clicked. On the other hand, if Check box 2 is clicked, the Checkbox 7 shoukd be enabled to be clicked if needed.

Is there something wrong with my sub?

Private Sub CheckBox1_Click()
  Sheets("Tool").Unprotect Password:="mypassword"
If CheckBox2.Value = True Then
    CheckBox7.Enabled = True  
Else
    CheckBox7.Enabled = False
End If
 Sheets("Tool").Protect Password:="mypassword"
End Sub




Aucun commentaire:

Enregistrer un commentaire