Je voudrais faire une boucle if avec comme condition un commandbutton actif ou pas .

j'ai fait ceci

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
 
If inserer.InsertProject1 = True Then
 
Workbooks("prototype1").Activate
Sheets("template_insert").Select
        Columns("B:J").Select
        Selection.Copy
        Sheets("Feuil1").Select
        Columns(FirstColProjectSheetSpecList).Select
        Selection.Insert Shift:=xlToRight
 
elseif inserer.InsertProject2 = True  then
Workbooks("prototype1").Activate
Sheets("template_insert").Select
        Columns("H:L").Select
        Selection.Copy
        Sheets("Feuil1").Select
        Columns(FirstColProjectSheetSpecList).Select
        Selection.Insert Shift:=xlToRight
 
End If
mais ca na marche pas comment faire?