Dim Tableau() As Byte Dim TableauSortie() As Byte Private Sub Form_Load() ReDim Tableau(12558) Tableau(1) = 12 Tableau(12500) = 15 compression Tableau, TableauSortie End Sub Sub compression(t1, t2) Dim i As Long, j As Long For i = LBound(t1) To UBound(t1) If t1(i) <> 0 Then ReDim Preserve t2(j) t2(j) = t1(i) j = j + 1 End If Next MsgBox UBound(t2) - LBound(t2) + 1 & " lignes dans le nouveau tableau" End Sub
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question