1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
With Cells(lig, 2)
On Error Resume Next
Sheets("TABLEAU DE BORD").Buttons("Btn" & .Address(0, 0)).Delete
On Error GoTo 0
Cells(lig, 1).Activate
Set Btn = Sheets("TABLEAU DE BORD").Buttons.Add(Cells(lig, 2).Left + 3, Cells(lig, 2).Top + 3, Cells(lig, 2).Width - 5, Cells(lig, 2).Height - 5)
Btn.Name = "Btn" & .Address(0, 0)
Sheets("TABLEAU DE BORD").Activate
Sheets("TABLEAU DE BORD").Cells(lig, 2).Select
Selection.Interior.Color = 255
Btn.Caption = "Répondre >"
Btn.Font.ColorIndex = 3[/I]
Selection.Borders(xlEdgeLeft).ThemeColor = 1
Selection.Borders(xlEdgeBottom).ThemeColor = 1
Selection.Borders(xlEdgeRight).ThemeColor = 1
Selection.Borders(xlEdgeTop).ThemeColor = 1
[I] Set Btn = Nothing
End With |
Partager