XL 2013 Afficher tout les données aprés filtre sans linges cachée dans listbox

roross

XLDnaute Junior
Bonsoir,

je besion d'afficher tout les colonnes dans listbox

Private Sub AfficheList()
'ListBox1.RowSource = Range("A2", Range("D65000").End(xlUp)).Address
Dim R As Range
ListBox1.Clear
For Each R In f.UsedRange.SpecialCells(xlCellTypeVisible).Rows
If R.Row > 1 Then ListBox1.AddItem R.Cells(1, 1)
Next R
End Sub
 

Pièces jointes

  • filtre.png
    filtre.png
    33.5 KB · Affichages: 14
  • Filtre.xlsm
    28.4 KB · Affichages: 16

sousou

XLDnaute Barbatruc
bonjour
En cherchant un peu.
Private Sub AfficheList()
'ListBox1.RowSource = Range("A2", Range("D65000").End(xlUp)).Address
Dim R As Range
ListBox1.Clear
For Each R In f.UsedRange.SpecialCells(xlCellTypeVisible).Rows
If R.Row > 1 Then

ListBox1.AddItem R.Cells(1, 1)
For col = 1 To 3
ListBox1.List(ListBox1.ListCount - 1, col) = R.Cells(1, col + 1)
Next
End If
Next R
End Sub
 

roross

XLDnaute Junior
bonjour
En cherchant un peu.
Private Sub AfficheList()
'ListBox1.RowSource = Range("A2", Range("D65000").End(xlUp)).Address
Dim R As Range
ListBox1.Clear
For Each R In f.UsedRange.SpecialCells(xlCellTypeVisible).Rows
If R.Row > 1 Then

ListBox1.AddItem R.Cells(1, 1)
For col = 1 To 3
ListBox1.List(ListBox1.ListCount - 1, col) = R.Cells(1, col + 1)
Next
End If
Next R
End Sub


Bonjour,

Merci pour votre aide
 

Discussions similaires

Statistiques des forums

Discussions
311 725
Messages
2 081 949
Membres
101 852
dernier inscrit
dthi16088