Bonjour
2tant donné qu'ils ne sont plus sur la même feuille, il faut inscrire la feuille sur lequel est placé le bouton dans la macro du checkbox
Private Sub CheckBox1_Click()
Sheets(1).CommandButton1.Enabled = CheckBox1.Value
If Sheets(1).CommandButton1.Enabled Then
Sheets(1).CommandButton1.BackColor = vbBlue
Sheets(1).CommandButton1.ForeColor = vbBlack
Else
Sheets(1).CommandButton1.BackColor = vbGrey
Sheets(1).CommandButton1.ForeColor = vbWhite
End If
End Sub
ou
Private Sub CheckBox1_Click()
With Sheets(1)
.CommandButton1.Enabled = CheckBox1.Value
If .CommandButton1.Enabled Then
.CommandButton1.BackColor = vbBlue
.CommandButton1.ForeColor = vbBlack
Else
.CommandButton1.BackColor = vbGrey
.CommandButton1.ForeColor = vbWhite
End If
End With
End Sub