Notifications
Clear all

Botão Pesquisar

3 Posts
2 Usuários
0 Reactions
571 Visualizações
(@holliman)
Posts: 0
New Member
Topic starter
 

Sou novo no vba, na verdade primeiro progama.
Estou fazendo uma agenda telefonica e preciso fazer um botão de pesquisa, onde o mesmo, procura o nome da pessoa em 6 planilhas.

tenho o botão e uma caixa de texto ( txtLOCALIZAR )e utilizo inicialmente os seguintes codigos:

If txtLOCALIZAR.Text = "" Then

Else
txtLOCALIZAR = UCase(txtLOCALIZAR)

End If


Do
If IsNumeric(ActiveCell) Then
ActiveCell.Offset(0, 1).Select
If ActiveCell.Value = txtLOCALIZAR.Value Then
Exit Do
End If

ActiveCell.Offset(1, -1).Select
If IsEmpty(ActiveCell) Then
Exit Do
End If
Else
Exit Do
End If

Loop Until ActiveCell.Text = txtLOCALIZAR.Text

On Error Resume Next
ActiveCell.Offset(0, -1).Select

CarregarDadosNoFormulário

PRECISO MUDAR ALGO?? ESSE NAO DAR CERTO.

 
Postado : 20/07/2016 12:05 pm
(@fernandofernandes)
Posts: 43750
Illustrious Member
 

Boa noite holliman

Seja bem-vindo ao fórum!

Como você é novato, para facilitar a tua participação no fórum, sugiro tomar conhecimento do conteúdo dos links abaixo:
viewtopic.php?f=7&t=203
viewtopic.php?f=7&t=7903
viewtopic.php?f=7&t=3841
viewtopic.php?f=7&t=16757
viewtopic.php?f=7&t=12600
viewtopic.php?f=7&t=3371

Quanto a tua dúvida, fica mais fácil do pessoal ajudar, se você anexar a planilha.

[]s
Patropi - Moderador

 
Postado : 20/07/2016 3:41 pm
(@holliman)
Posts: 0
New Member
Topic starter
 

Um userform e São 6 Planilhas assim como anexo:

 
Postado : 21/07/2016 6:56 am