jlhdata = WorksheetFunction.CountA(Sheets("db_Customer").Range("A2:A1048576"))
Select Case jlhdata
Case Is > 0
area = "A2:D" & jlhdata + 1
frm_CustomerData.lst_data.Enabled = True
Case 0
area = "A2:D2"
frm_CustomerData.lst_data.Enabled = False
End Select
With frm_CustomerData.lst_data
.ColumnCount = 4
.ColumnHeads = True
.ColumnWidths = "100;150;220;100"
.RowSource = Worksheets("db_Customer").Range(area).Address(external:=True)
End With
0 komentar:
Posting Komentar