Para carregar os demais listview, desde que estejam com os nomes padrões, utilize :
Private Sub Atualizar()
Dim Item As ListItem
Dim LinhaFinal As Integer
Dim i As Integer
'Page Perfumaria
ListView1.ListItems.Clear
LinhaFinal = Plan1.Cells(Rows.Count, 1).End(xlUp).Row
For i = 2 To LinhaFinal
Set Item = ListView1.ListItems.Add(Text:=Plan1.Cells(i, 1))
Item.SubItems(1) = Plan1.Cells(i, 2)
Item.SubItems(2) = Plan1.Cells(i, 3)
Item.SubItems(3) = Format(Plan1.Cells(i, 4), "R$ #,##0.00")
Next
'Page Vestuario
ListView3.ListItems.Clear
LinhaFinal = Plan2.Cells(Rows.Count, 1).End(xlUp).Row
For i = 2 To LinhaFinal
Set Item = ListView3.ListItems.Add(Text:=Plan2.Cells(i, 1))
Item.SubItems(1) = Plan2.Cells(i, 2)
Item.SubItems(2) = Plan2.Cells(i, 3)
Item.SubItems(3) = Format(Plan2.Cells(i, 4), "R$ #,##0.00")
Next
'Page Informatica
ListView5.ListItems.Clear
LinhaFinal = Plan3.Cells(Rows.Count, 1).End(xlUp).Row
For i = 2 To LinhaFinal
Set Item = ListView5.ListItems.Add(Text:=Plan3.Cells(i, 1))
Item.SubItems(1) = Plan3.Cells(i, 2)
Item.SubItems(2) = Plan3.Cells(i, 3)
Item.SubItems(3) = Format(Plan3.Cells(i, 4), "R$ #,##0.00")
Next
End Sub
Existem mil maneiras de preparar Neston. Invente a sua!
http://www.youtube.com/ExpressoExcel
Postado : 30/11/2015 5:15 pm