Sub AddcheckboxesPerso()
Dim cell, LRow As Single
Dim chkbx As CheckBox
Dim MyLeft, MyTop, MyHeight, MyWidth As Double
Doc_cell = 5 'F
Check_cell = 6 'G
St_cell_link = 10
Application.ScreenUpdating = False
For col = 1 To 10
Doc_cell = Doc_cell + 1
Check_cell = Check_cell + 1
For cell = 16 To 22
If Cells(cell, Doc_cell).Value <> "" Then
MyLeft = Cells(cell, Check_cell).Left
MyTop = Cells(cell, Check_cell).Top
MyHeight = Cells(cell, Check_cell).Height
MyWidth = Cells(cell, Check_cell).Width
ActiveSheet.CheckBoxes.Add(MyLeft, MyTop, MyWidth, MyHeight).Select
With Selection
.Caption = ""
.Value = xlOff
.Display3DShading = False
.LinkedCell = ActiveWorkbook.Worksheets("Feuil2").Cells(St_cell_link, 29).Address 'AC 10
.OnAction = "compter" 'affecte la macro ici l'ideal serait de mettre "WriteDate(Cell+1)" or ce n'est pas possible <!>
End With
St_cell_link = St_cell_link + 1
End If
Next cell
Next col
Application.ScreenUpdating = True
End Sub