Dim i, k, j As Integer
Dim C As Range
'affects() stocke les lignes
Dim affects() As Range
j = 0
i = 0
With Worksheets('Affectations').Columns(5)
Set C = .Find(Numtask, LookIn:=xlValues, LookAt:=xlWhole)
If Not C Is Nothing Then
j = C.Row
Do
ReDim Preserve affects(i)
'stockage ligne courante <- BUG !
affects(i) = Worksheets('Affectations').Rows(j)
i = i + 1
j = j + 1
Loop While Worksheets('Affectations').Cells(j, 5).Value = Numtask
End If
End With