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
Por walber
Posts
#19872
Boa noite

Criei uma planilha de cadastro usando UserForm, não ficou lá essas coisas, mas atende a minha necessidade.
o problema esta na UserForm pesquisa , o código que coloquei só puxa os dados da primeira linha. Quando seleciono outro valor não faz a busca.
Coloquei para só selecionar quando clico na OS

se puder da algumas dicas para melhora fico grato
Você não está autorizado a ver ou baixar esse anexo.
Avatar do usuário
Por Reinaldo
Avatar
#19883
Experimente:
Altere em sua rotina ListDescricao a linha do if conforme abaixo
Código: Selecionar todos
Private Sub ListDescricao_Change()
Dim Lin As Integer
Lin = 2
Do Until Sheets("CLIENTES").Cells(Lin, 4).Value = Empty
    If Sheets("CLIENTES").Cells(Lin, 4).Text = ListDescricao.Value Then
        TextNome.Value = Sheets("CLIENTES").Cells(Lin, 1).Value
        TextCPF.Value = Sheets("CLIENTES").Cells(Lin, 2).Value
        TextTelefone.Value = Sheets("CLIENTES").Cells(Lin, 3).Value
        TextDefeito.Value = Sheets("CLIENTES").Cells(Lin, 5).Value
        Exit Do
    End If
Lin = Lin + 1
Loop
End Sub
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