Salut, Quelqu'un pourrait-il m'aider?
pourquoi le code si-après génère l'erreur suivant: Variable objet ou variable bloc With non définie (erreur 91)

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
Sub Creation_Cbar()
    Dim Cbar As CommandBar
 
    Set Cbar = CommandBars.Add(Name:="Génie civil", Position:=msoBarTop, Temporary:=True)
    Debug.Print CommandBars.Count
    With Cbar
        .Visible = True
        .Protection = msoBarNoMove + msoBarNoCustomize
    End With
 
End Sub