Fórum Excel Bácico, Avançado e Vba
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.
Fórum Excel Bácico, Avançado e Vba

Este fórum é destina a usuário de Excel, que queiram compartilhar informações a básicas, avançadas e programação em VBA...
 
InícioInício  Últimas imagensÚltimas imagens  ProcurarProcurar  RegistarRegistar  Entrar  

 

 Ajuda em Planilha Excel VBA

Ir para baixo 
AutorMensagem
imPrimo




Mensagens : 1
Data de inscrição : 20/02/2017

Ajuda em Planilha Excel VBA Empty
MensagemAssunto: Ajuda em Planilha Excel VBA   Ajuda em Planilha Excel VBA EmptySeg Fev 20, 2017 4:18 pm

Ola Estou desenvolvendo um projeto em excel vba onde tenho um botao consultar.

Quando Jogo este codigo:

Private Sub UserForm_Activate()



'Dim Registros As Long
'Registros = Plan2.Range("A6553").End(xlUp).Row
'If Registros > 1 Then
'With Lstdecricao1
'Lstdescricao1.ColumnCount = 4
' Lstdescricao1.RowSource = "Plan1!K2:n2" & Registros

'End With
'End If
'End Sub

o botao consultar com este codigo para :

Private Sub BtnConsultar_Click()

Dim Lin As Integer
Lin = 2
Do Until Sheets("Plan1").Cells(2, Cool.Value = Empty

If Sheets("Plan1").Cells(2, Cool.Value = Lstdescricao1.Value Then

Txttel2.Value = Sheets("plan1").Cells(Lin, Cool.Value
Txtcliente1.Value = Sheets("Plan1").Cells(Lin, 1).Value
Txtend1.Value = Sheets("plan1").Cells(Lin, 2).Value
Txtinformacao1.Value = Sheets("plan1").Cells(Lin, 3).Value
Txtuf1.Value = Sheets("Plan1").Cells(Lin, 4).Value
Txtcep1.Value = Sheets("Plan1").Cells(Lin, 5).Value
Txtemail1.Value = Sheets("plan1").Cells(Lin, 6).Value
Txttel1.Value = Sheets("plan1").Cells(Lin, 7).Value

txttipoimovel1.Value = Sheets("plan1").Cells(Lin, 9).Value
Txtend2.Value = Sheets("plan1").Cells(Lin, 10).Value
Txtbairro1.Value = Sheets("plan1").Cells(Lin, 11).Value
txttipo1.Value = Sheets("plan1").Cells(Lin, 12).Value
Txtvalor1.Value = Sheets("plan1").Cells(Lin, 13).Value
Txtcidade1.Value = Sheets("plan1").Cells(Lin, 14).Value
Txtuf2.Value = Sheets("plan1").Cells(Lin, 15).Value
txtpermuta1.Value = Sheets("plan1").Cells(Lin, 16).Value
txtdescricao1.Value = Sheets("plan1").Cells(Lin, 17).Value

End If



Lin = Lin + 1
Loop



End Sub


O que devo estar fazendo de errado?

Me ajudem por favor
Ir para o topo Ir para baixo
 
Ajuda em Planilha Excel VBA
Ir para o topo 
Página 1 de 1
 Tópicos semelhantes
-
» Importar Planilha para outra Planilha no excel
» Ajuda - Planilha Complexa
» Ajuda excel
» Ajuda Excel - VBA
» planilha excel

Permissões neste sub-fórumNão podes responder a tópicos
Fórum Excel Bácico, Avançado e Vba :: Avançado/VBA :: Excel Avançado/VBA-
Ir para: