Private Sub CommandButton1_Click()
Dim selstr As String
For Each ligne In ActiveWindow.RangeSelection.Rows
If Cells(ligne.Row, 1).Text = 'X' Then
If selstr <> '' Then
selstr = selstr & ',' & ligne.Row & ':' & ligne.Row
Else
selstr = ligne.Row & ':' & ligne.Row
End If
End If
Next
Range(selstr).Select
ActiveWindow.RangeSelection.Copy Destination:=Workbooks('Classeur2').Worksheets('Feuil2').Range('A1')
End Sub