0% encontró este documento útil (0 votos)
148 vistas3 páginas

Sistema de Búsqueda en Excel VBA

Este documento presenta un formulario en Excel para buscar clientes. Incluye código para filtrar filas de una hoja según el texto ingresado en un cuadro de texto, y mostrar los resultados coincidentes en una lista desplegable. También incluye código para seleccionar la fila correspondiente al cliente seleccionado en otra hoja.

Cargado por

Abel T. Martinez
Derechos de autor
© © All Rights Reserved
Nos tomamos en serio los derechos de los contenidos. Si sospechas que se trata de tu contenido, reclámalo aquí.
Formatos disponibles
Descarga como DOCX, PDF, TXT o lee en línea desde Scribd
0% encontró este documento útil (0 votos)
148 vistas3 páginas

Sistema de Búsqueda en Excel VBA

Este documento presenta un formulario en Excel para buscar clientes. Incluye código para filtrar filas de una hoja según el texto ingresado en un cuadro de texto, y mostrar los resultados coincidentes en una lista desplegable. También incluye código para seleccionar la fila correspondiente al cliente seleccionado en otra hoja.

Cargado por

Abel T. Martinez
Derechos de autor
© © All Rights Reserved
Nos tomamos en serio los derechos de los contenidos. Si sospechas que se trata de tu contenido, reclámalo aquí.
Formatos disponibles
Descarga como DOCX, PDF, TXT o lee en línea desde Scribd

FORMULARIO BUSQUEDA CLIENTES

SISTEMA COMPLETO EN EXCEL:


https://www.youtube.com/watch?v=KtnYCpEI51g&t=831s

APRENDE LA LIA DE CODIGO DE BUSQUEDA INTELIGENTE:


https://www.youtube.com/watch?v=qpMMMbnH7-c&t=719s

COLOR COLOR ROJO COLOR


AZUL NO REMPLAZAR NEGRO
SE COPIA COPIAR
Private Sub UserForm_Initialize()

Me.LISTA.RowSource = "CLIENTES"

Me.LISTA.ColumnCount = 6

End Sub

Private Sub TEXTO_Change()

B
NumeroDatos = Hoja2.Range(" " & Rows.Count).End(xlUp).Row
''MsgBox NumeroDatos
Hoja2.AutoFilterMode = False
Me.LISTA = Clear
Me.LISTA.RowSource = Clear

y=0

For fila = 3 To NumeroDatos


descrip = Hoja2.Cells(fila, 3).Value

If UCase(descrip) Like "*" & UCase(Me.TEXTO.Value) & "*" Then

Me.LISTA.AddItem
Me.LISTA.List(y, 0) = Hoja2.Cells(fila, 2).Value
Me.LISTA.List(y, 1) = Hoja2.Cells(fila, 3).Value
Me.LISTA.List(y, 2) = Hoja2.Cells(fila, 4).Value
Me.LISTA.List(y, 3) = Hoja2.Cells(fila, 5).Value
Me.LISTA.List(y, 4) = Hoja2.Cells(fila, 6).Value
Me.LISTA.List(y, 5) = Hoja2.Cells(fila, 7).Value
y=y+1

End If

Next

End Sub
Private Sub LISTA_DblClick(ByVal Cancel As MSForms.ReturnBoolean)

On Error GoTo ERR:


L = LISTA.List(LISTA.ListIndex, 0)
Sheets("Hoja_Clientes").Select
While ActiveCell.Value <> "" And ActiveCell.Value <> L And ActiveCell.Value <> Val(L)
ActiveCell.Offset(1, 0).Select
Wend

mensaje = LISTA.List(LISTA.ListIndex, 0)
Sheets("FACTURA").Select
Range("F4").Select
''MsgBox mensaje

ActiveCell.Value = mensaje
Unload Me

ERR:

End Sub

También podría gustarte