1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
'Création d'un tableau contenant mes lignes
Dim TabE(), LE&, TabS(), LS&, C&, i&
ReDim TabS(1 To 50000, 1 To 10)
For i = LBound(Noms_feuilles) To UBound(Noms_feuilles)
TabE = Sheets(Noms_feuilles(i)).ListObjects(1).DataBodyRange.Value ' <-------- ICI ----------
If UBound(TabS, 2) < UBound(TabE, 2) Then ReDim Preserve TabS(1 To UBound(TabS, 1), 1 To UBound(TabE, 2))
For LE = 1 To UBound(TabE, 1)
If TabE(LE, Col) = 1 Then
LS = LS + 1
For C = 1 To UBound(TabE, 2)
TabS(LS, C) = TabE(LE, C)
Next C
End If
Next LE
Next i
'Création d'un nouveau classeur et "collage" du tableau contenant les lignes dans ce classeur
Workbooks.Add
With Range("A1")
.Value = "Liste des participants à " & ev
.Font.Size = 16
.Font.Bold = True
End With
'Colle les valeurs du tableau créé dans la feuille
ActiveSheet.[A4].Resize(LS, UBound(TabS, 2)).Value = TabS |
Partager