Private Sub CommandButton1_Click()
'Ici je souhaite que le "value" de la selection
'reprenne le caption du CmdB1 uniquement si la cellule de la colonne B est vide
'sinon reprise du caption du CmdB1
Dim p As Range, Maplage As Range, coulfond As Long, coulpol As Long
Set Maplage = Selection
coulfond = CommandButton1.BackColor
coulpol = CommandButton1.ForeColor
For Each p In Maplage
If IsEmpty(Range("B" & p.Row)) Then
p.Value = CommandButton1.Caption
p.Font.Bold = CommandButton1.Font.Bold
p.Font.Italic = CommandButton1.Font.Italic
p.Interior.Color = coulfond
p.Font.Color = coulpol
Else
p.Value = Range("B" & p.Row).Value
End If
Next p
End Sub