Sub ListeVilles()
Dim i As CheckBox
Range("D:D").Clear
For Each i In Feuil1.CheckBoxes
If i.Value = xlOn Then _
Range("d" & Rows.Count).End(xlUp)(2) = i.Caption
Next i
End Sub
Papou c'est du trés "lourd"
C'est presque ça,
Le texte en B10 doit se mettre sur la deuxième ligne qui suit le dernier texte de la colonne D,
Merci.
Sub ListeVilles()
With Sheets("Feuil1")
cel = ActiveCell.Address
.Range("D:D").ClearContents
lg = 2
For Each ctl In .Shapes
If ctl.Name Like "Check*" Then
If .Range(ctl.ControlFormat.LinkedCell).Value = True Then
ctl.Select
.Cells(lg, 4) = Selection.Characters.Text
lg = lg + 1
End If
End If
Next
.Cells(lg + 1, 4) = .Range("B10")
.Range(cel).Select
End With
Application.ScreenUpdating = True
End Sub
ctl.Select
.Cells(lg, 4) = Selection.Characters.Text
.Cells(lg, 4) = ctl.OLEFormat.Object.Text
C'est juste pour partager ma "découverte" et dans le cadre du M.I.A.S "Mouvement Internationnal Anti Select"