Sub ModifBarCel() ' a lancer a l'open ou l'activate d'un sheets en particulier(prévoir un reset de la bar a la fermeture du fichier
Dim i&
Set bar = CommandBars("cell")
bar.Reset
For Each b In bar.Controls
i = i + 1
If b.Caption = "Insérer un co&mmentaire" Then b.Enabled = False: Exit For
Next
Set bout = bar.Controls.Add(msoControlButton, before:=i + 1)
bout.Caption = "commentaire Vert"
bout.OnAction = "'AddCommentPerso " & Chr(34) & 12 & """,""" & 10 & """,""" & 0 & """,""" & vbWhite & """,""" & RGB(170, 255, 155) & """,""" & 3.5 & "'"
Set bout = bar.Controls.Add(msoControlButton, before:=i + 2)
bout.Caption = "commentaire rouge"
bout.OnAction = "'AddCommentPerso " & Chr(34) & 9 & """,""" & 10 & """,""" & 0 & """,""" & vbWhite & """,""" & vbRed & """,""" & 3.5 & "'"
End Sub
Sub AddCommentPerso(fontcolor, fontsize, linecolor, bagroundcolor, fillforcolor, offsetXY)
MsgBox fontsize
'tu sais ce qu'il te reste a faire ici :)
End Sub