Este fórum está sendo desativado

Depois de 9 anos, este fórum será desativado. Mas calma.... estamos migrando para uma comunidade no DISCORD. Junte-se a nós.

ENTRAR PARA DISCORD

Tópicos relacionados a códigos VBA, gravação de macros, etc.
  • Avatar do usuário
Avatar do usuário
Por IvanPi
Posts Avatar
#68037
Olá pessoal, estou com o seguinte código abaixo:
Código: Selecionar todos
   For i = 1 To 40
      cboNumero.AddItem i
   Next i
  
   For y = 1 To ListView.ListItems.Count
         If cboNumero.List(y) = ListView.ListItems.Item(y).ListSubItems(1) Then
            cboNumero.RemoveItem (y)
         End If
   Next y
Estou tentando, remover itens da combobox, de acordo com o número que está listview, coluna da qual tb tem números. Então, número que aparecerem na Listview, devem ser removidos da combobox, através de um loop, porém sem sucesso.

Poderiam me dar uma luz? :)

Desde já obrigado.

Ivan Jpi
Avatar do usuário
Por IvanPi
Posts Avatar
#68097
Olá, consegui o código, num grupo de Whats:
Código: Selecionar todos
     For i = 1 To 40
        cboNumero.AddItem i
    Next i

    For y = 0 To cboNumero.ListCount
        For x = 1 To ListView.ListItems.Count
            If cboNumero.ListCount = y Then Exit Sub
            If cboNumero.List(y) = ListView.ListItems.Item(x).SubItems(1) Then
                cboNumero.RemoveItem (y)
            End If
        Next x
    Next y
Valeu pessoal!
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]

Estamos migrando para uma comunidade no Discord