Sub hiendulieu()
Dim ws as worksheet
Dim lastrow as Double
Set ws = Thisworkbook.sheets("Tinhtrang")
Lastrow = Excel.Worksheetfuntion.CountA(ws.Range("A:A"))
If Lastrow = 1 then Lastrow = 2
With lb_inout
.ColumnCount = 13
.ColumnHeads = True
.ColumnWidths = "30,50,80,80,60,60,70,60,90,55,80,70,80"
.RowSource = ws.Name & "!A2:M" & lastrow
End with
End sub
Các cao nhân chỉ giáo với ạ. Chạy nó báo lỗi Runtime error "380"
Could not set the RowSource Property. Invaild property value
Dim ws as worksheet
Dim lastrow as Double
Set ws = Thisworkbook.sheets("Tinhtrang")
Lastrow = Excel.Worksheetfuntion.CountA(ws.Range("A:A"))
If Lastrow = 1 then Lastrow = 2
With lb_inout
.ColumnCount = 13
.ColumnHeads = True
.ColumnWidths = "30,50,80,80,60,60,70,60,90,55,80,70,80"
.RowSource = ws.Name & "!A2:M" & lastrow
End with
End sub
Các cao nhân chỉ giáo với ạ. Chạy nó báo lỗi Runtime error "380"
Could not set the RowSource Property. Invaild property value