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 vilc
Posts
#69352
tenho a seguinte tabela com nome: servidores

coluna A Coluna B

Nome Secretarias
João Administração
Maria Obras

queria que quando selecionar joão na combobox ele mostrasse na texbox Administração assim por diante
Você não está autorizado a ver ou baixar esse anexo.
Avatar do usuário
Por JCabral
Avatar
#69378
Veja se ajuda
Código: Selecionar todos
Private Sub ComboSolicitante_Change()

    Dim SecretariaID As Range

    Set SecretariaID = Planilha1.Range("A:A").Find(what:=ComboSolicitante, LookIn:=xlValues, lookat:=xlWhole)
    If Not SecretariaID Is Nothing Then
        Me.TxtSecretaria.Value = SecretariaID.Offset(, 1).Value
    End If
    Set SecretariaID = Nothing
    
End Sub

Por vilc
Posts
#69386
vilc escreveu: 24 Fev 2022 às 20:40 tenho a seguinte tabela com nome: servidores

coluna A Coluna B

Nome Secretarias
João Administração
Maria Obras

queria que quando selecionar joão na combobox ele mostrasse na texbox Administração assim por diante
Ok. obrigado amigo, vou colocar aqui.
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