SALAM PEMBUKA

  • ASSALAMU 'ALAIKUM WAROHMATULLAHI WABAROKATUH

Jumat, 10 Februari 2017

Menampilkan Data Worksheet Ke dalam ListBox

Menampilkan Data Worksheet Ke dalam ListBox
Sub TampilkanSemua()
Set wsDtbsPlgn = Sheets("Data")
ListBox1.Clear
ListBox1.ColumnCount = 6
ListBox1.ColumnWidths = 80 & ";" & 25 & ";" &
35 & ";" & 65 & ";" & 120
Set rgTampil = wsDtbsPlgn.Range
("A1:A100").SpecialCells(xlCellTypeVisible)
For Each i In rgTampil
With ListBox1
.AddItem
.List(.ListCount - 1, 0) = i.Value
.List(.ListCount - 1, 1) = i.Offset(0, 1).Value
.List(.ListCount - 1, 2) = i.Offset(0, 2).Value
.List(.ListCount - 1, 3) = i.Offset(0, 3).Value
.List(.ListCount - 1, 4) = i.Offset(0, 4).Value
End With
Next i
End Sub

Tidak ada komentar:

Posting Komentar