Activation checkbox à partir d'un chiffre
Bonjour, j'aimerais savoir si c'est possible d'activer automatiquement un checkbox à partir d'un chiffre. En fait, un chiffre de 1 à 4 chiffres pour ouvert, coché, barré, et coché barré. http://img177.imageshack.us/img177/2...oxesaw4.th.jpg
Donc ça ressemblerais à quelque chose comme ca, je ne sais juste pas dans quelle fonction mettre ce code pour qu'il modifie la checkbox automatiquement lorsqu'il y a un chiffre.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| Sheets("Feuil2").Select
'*** Ouvert ***'
If Sheets("Feuil2").Cells(10, 1).Value = 1 Then
Sheets("Feuil1").CheckBox5.Enabled = True
Sheets("Feuil1").CheckBox5.Value = False
End If
'*** Coché ***'
If Sheets("Feuil2").Cells(10, 1).Value = 2 Then
Sheets("Feuil1").CheckBox5.Enabled = True
Sheets("Feuil1").CheckBox5.Value = True
End If
'*** Barré ***'
If Sheets("Feuil2").Cells(10, 1).Value = 3 Then
Sheets("Feuil1").CheckBox5.Enabled = False
Sheets("Feuil1").CheckBox5.Value = False
End If
'*** Coché barré ***'
If Sheets("Feuil2").Cells(10, 1).Value = 4 Then
Sheets("Feuil1").CheckBox5.Enable = False
Sheets("Feuil1").CheckBox5.Value = True
End If |
Merci pour l'aide.