Fiitro - Excel VBA

Asked

Viewed 26 times

1

I’m trying to create reports. I’ve never done this before because then any and all help is very welcome. My table starts in column "A" and goes to column "BL". There are 64 columns. I want to filter all clients without repetition and this client list appears on a Listview. When I double-click on the name inside the listview, open the Userformclients with all the completed textboxes.

I have this code where I try to filter It still doesn’t work, it needs some adjustments. inserir a descrição da imagem aqui

  • Are you sure the mistake Object doesn't support this property or method is happening in linha = linha + 1? I would guess that the error is in one of the two previous lines. Is that really the line that turns yellow? In the print, you didn’t paint the wrong line, or advance a line before printing?

1 answer

0

After inserting the line with the collection Listitems, you add the columns with the collection Listsubitems.

change the line

li.ListItems.Add Text:=Sheets("Customers").Cells(linha, 2).Value

To:

li.ListSubItems.Add Text:=Sheets("Customers").Cells(linha, 2).Value
  • Lines are identical. Change what?

  • Not, on your command is li.ListItems.Add on what I ordered is Listsubitems.Add

Browser other questions tagged

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