Saltar al contenido
View in the app

A better way to browse. Learn more.

Ayuda Excel

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

buscar una fecha en un listbox

publicado

hola he creado un formulario para añadir registros, modificar, eliminar, buscar etc. el problema lo tengo en el boton busqueda que el dato que necesito que busque es la fecha y sale un mensaje 380. 

podeis por favor ayudarme en donde tengo que modificar y que poner?

 

adjunto fichero. 

gracias. 

Partes de Trabajo.xlsm

Featured Replies

publicado

Sustituye tu procedimiento por este:

Private Sub bt_busqueda_Click()
Dim y As Long, fila as Long
lista.RowSource = ""
For fila = 5 To Hoja3.Range("a" & Rows.Count).End(xlUp).Row
   If Hoja3.Cells(fila, 2).Text Like "*" & txt_busqueda.Value & "*" Then
       Me.lista.AddItem
       Me.lista.List(y, 0) = ActiveSheet.Cells(fila, 1).Value '<- En esta línea había una letra o
       Me.lista.List(y, 1) = ActiveSheet.Cells(fila, 2).Value '   en lugar de un cero
       Me.lista.List(y, 2) = ActiveSheet.Cells(fila, 3).Value
       Me.lista.List(y, 3) = ActiveSheet.Cells(fila, 4).Value
       Me.lista.List(y, 4) = ActiveSheet.Cells(fila, 5).Value
       y = y + 1
   End If
Next
End Sub

 

Editado el por Antoni

publicado
  • Autor

Muchas gracias Antoni, ahora si hace la busqueda. 

mil gracias de nuevo. 

Archivado

Este tema está ahora archivado y está cerrado a más respuestas.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.