Bonjour,
Je tape ce code pour un OptionButton et il y a en seize, est-il possible de raccourcir ce code ?
Je ne sais pas faire autrement, alors si vous pouvez me montrer comment faire ce serait super sympa.
Merci par avance

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Private Sub Opt1_Click()
If Opt1.Value = True Then
    Opt1.Top = 6
    Opt2.Visible = False
    Opt3.Visible = False
    Opt4.Visible = False
    Opt5.Visible = False
    Opt6.Visible = False
    Opt7.Visible = False
    Opt8.Visible = False
    Opt9.Visible = False
    Opt10.Visible = False
    Opt11.Visible = False
    Opt12.Visible = False
    Opt13.Visible = False
    Opt14.Visible = False
    Opt15.Visible = False
    Opt16.Visible = False
    CmbOK.Top = 30
    CmbFerm.Top = 60
    CmbFerm.Left = 30
    CmbAnnul.Top = 30
    FrmChoix.Height = 110
    FrmChoix.Width = 125
Else
Opt1.Value = False
    Opt1.Top = 6
    Opt2.Visible = True
    Opt3.Visible = True
    Opt4.Visible = True
    Opt5.Visible = True
    Opt6.Visible = True
    Opt7.Visible = True
    Opt8.Visible = True
    Opt9.Visible = True
    Opt10.Visible = True
    Opt11.Visible = True
    Opt12.Visible = True
    Opt13.Visible = True
    Opt14.Visible = True
    Opt15.Visible = True
    Opt16.Visible = True
    CmbOK.Top = 162
    CmbFerm.Top = 162
    CmbAnnul.Top = 162
    FrmChoix.Height = 205
    FrmChoix.Width = 245
End If
End Sub