Load table in Listview

Asked

Viewed 19 times

0

I’m trying to load a table into listview but when I press the button it gives me a mistake saying that the Required object(error 424).

Private Sub btnPesquisar_Click()
With txtResult1
    .Gridlines = True
    .View = lvwReport
    .FullRowSelect = True
    
    .ColumnHeaders.Add Text:="COR", Width:=50
    .ColumnHeaders.Add Text:="FISICO", Width:=100
    .ColumnHeaders.Add Text:="PENHORA", Width:=100
    .ColumnHeaders.Add Text:="DISPONIVEL", Width:=100
    .ColumnHeaders.Add Text:="ENTRADA", Width:=100
    .ColumnHeaders.Add Text:="PREV. DE ENT. FUTURA", Width:=100
    .ColumnHeaders.Add Text:="SKU", Width:=100    
End With
    Call Atualizar
End Sub

Private Sub Atualizar()
Dim Item As ListItem
Dim LinhaFinal As Integer
Dim i As Integer

txtResult1.ListItems.Clear

LinhaFinal = Plan1.Cells(Rows.Count, 1).End(x1Up).Row

For i = 2 To LinhaFinal
    txtResult1.ListItems.Add Text:=TBSTQTEC.Cells(i, 1)
Next
End Sub
  • Save it, my dear! Whenever you ask for help about an error, point to the line in which the error happened. It is a basic information to answer.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.