Cara Lain menampilkan data pada ListBox, Berdasarkan list yang di worksheet.
isi dan judulnya.
Sub DATAMB52()
Dim sh As Worksheet
Set sh = ThisWorkbook.Sheets("REPORT")
Dim Last_Row As Long
Last_Row = Application.WorksheetFunction.CountA(sh.Range("A:F"))
With Me.ListBox1
.ColumnHeads = True
.ColumnCount = 6
.ColumnWidths = "80,150,80,50,50,50"
If Last_Row = 1 Then
.RowSource = "REPORT!A2:F2"
Else
.RowSource = "REPORT!A2:F" & Last_Row
End If
End With
End Sub
Set sh = ThisWorkbook.Sheets("REPORT")
Dim Last_Row As Long
Last_Row = Application.WorksheetFunction.CountA(sh.Range("A:F"))
With Me.ListBox1
.ColumnHeads = True
.ColumnCount = 6
.ColumnWidths = "80,150,80,50,50,50"
If Last_Row = 1 Then
.RowSource = "REPORT!A2:F2"
Else
.RowSource = "REPORT!A2:F" & Last_Row
End If
End With
End Sub