Bonjour à tous voici mon code :
Private Sub ListBox1_Click()
Dim i As Byte
i = Me.ListBox1.ListIndex + 3
contactpro = Sheets("Réglementations").Cells(10, i)
If contactpro = "OUI" Then
OptionButtonoui = True
Else: OptionButtonnon = True
End If
Dim j As Byte
j = Me.ListBox1.ListIndex + 3
contactinvs = Sheets("Réglementations").Cells(11, j)
If contactinvs = "OUI" Then
OptionButtonoui1 = True
Else: OptionButtonnon1 = True
End If
End Sub
Le problème est que lorsque je lance l'application, le premier if est inactif. Savez vous pourquoi?
Merci d'avance pour vos réponses !