M
Mathou
Guest
Re bonjour,
Quelqu'un pourrait il m'aider à corriger ce code qui ne fonctionne pas?
Les optionsbuttons et les checkbox sont dans 2 Frames cela a t'il de l'importance?
Merci de votre aide.
Private Sub Tester_Click()
If Cells(1, 1).Value = Célibataire Then
OptionButton1 = True
OptionButton2 = False
OptionButton3 = False
OptionButton4 = False
End If
If Cells(1, 1).Value = Marié Then
OptionButton1 = False
OptionButton2 = True
OptionButton3 = False
OptionButton4 = False
End If
If Cells(1, 1).Value = PACSE Then
OptionButton1 = False
OptionButton2 = False
OptionButton3 = True
OptionButton4 = False
End If
If Cells(1, 1).Value = Divorcé Then
OptionButton1 = False
OptionButton2 = False
OptionButton3 = False
OptionButton4 = True
End If
If Cells(2, 1) = SPP Then
CheckBox1 = True
CheckBox2 = False
CheckBox3 = False
End If
If Cells(2, 1) = SPV Then
CheckBox1 = False
CheckBox2 = True
CheckBox3 = False
End If
If Cells(2, 1) = Stagiaire Then
CheckBox1 = False
CheckBox2 = False
CheckBox3 = True
End If
If Cells(2, 1) = SPP SPV Then
CheckBox1 = True
CheckBox2 = True
CheckBox3 = False
End If
If Cells(2, 1) = SPP Stagiaire Then
CheckBox1 = True
CheckBox2 = False
CheckBox3 = True
End If
If Cells(2, 1) = SPV Stagiaire Then
CheckBox1 = False
CheckBox2 = True
CheckBox3 = True
End If
End Sub
Quelqu'un pourrait il m'aider à corriger ce code qui ne fonctionne pas?
Les optionsbuttons et les checkbox sont dans 2 Frames cela a t'il de l'importance?
Merci de votre aide.
Private Sub Tester_Click()
If Cells(1, 1).Value = Célibataire Then
OptionButton1 = True
OptionButton2 = False
OptionButton3 = False
OptionButton4 = False
End If
If Cells(1, 1).Value = Marié Then
OptionButton1 = False
OptionButton2 = True
OptionButton3 = False
OptionButton4 = False
End If
If Cells(1, 1).Value = PACSE Then
OptionButton1 = False
OptionButton2 = False
OptionButton3 = True
OptionButton4 = False
End If
If Cells(1, 1).Value = Divorcé Then
OptionButton1 = False
OptionButton2 = False
OptionButton3 = False
OptionButton4 = True
End If
If Cells(2, 1) = SPP Then
CheckBox1 = True
CheckBox2 = False
CheckBox3 = False
End If
If Cells(2, 1) = SPV Then
CheckBox1 = False
CheckBox2 = True
CheckBox3 = False
End If
If Cells(2, 1) = Stagiaire Then
CheckBox1 = False
CheckBox2 = False
CheckBox3 = True
End If
If Cells(2, 1) = SPP SPV Then
CheckBox1 = True
CheckBox2 = True
CheckBox3 = False
End If
If Cells(2, 1) = SPP Stagiaire Then
CheckBox1 = True
CheckBox2 = False
CheckBox3 = True
End If
If Cells(2, 1) = SPV Stagiaire Then
CheckBox1 = False
CheckBox2 = True
CheckBox3 = True
End If
End Sub