Apenas adaptando sua rotina...
Private Sub CarregarListbox()
Dim lLast As Long
Dim l As Long
With ThisWorkbook.Sheets("Lista")
Me.ListBox1.ColumnCount = 7
ListBox1.Clear
lLast = .Cells(.Rows.Count, "A").End(xlUp).Row
'Considerando uma linha de cabeçalho:
For l = 2 To lLast
If .Rows(l).Hidden = False Then
ListBox1.AddItem .Cells(l, "A")
Me.ListBox1.List(Me.ListBox1.ListCount - 1, 1) = Plan1.Cells(l, "B")
Me.ListBox1.List(Me.ListBox1.ListCount - 1, 2) = Plan1.Cells(l, "C")
Me.ListBox1.List(Me.ListBox1.ListCount - 1, 3) = Plan1.Cells(l, "D")
Me.ListBox1.List(Me.ListBox1.ListCount - 1, 4) = Plan1.Cells(l, "E")
Me.ListBox1.List(Me.ListBox1.ListCount - 1, 5) = Plan1.Cells(l, "F")
Me.ListBox1.List(Me.ListBox1.ListCount - 1, 6) = Plan1.Cells(l, "G")
End If
Next l
End With
End Sub
Existem mil maneiras de preparar Neston. Invente a sua!
http://www.youtube.com/ExpressoExcel
Postado : 04/08/2012 7:38 pm