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.

Listboxt additem

publicado

Buenas noches mi pregunta es la siguiente, para quien desee ayudarme con este codigo...Muchas gracias de antemano...

Tengo un formulario y dentro de el un listboxt, el cual carga al inicializarce las 13 columnas de la hoja excel, pero cuando hago una busqueda  por nombre solo me carga 10 columnas, yo se que solo llega hasta 10, pero me gustaria saber como con rowsource puedo cargar con la busqueda las mismas 13 columnas...Muchas gracias.

Private Sub nombre_Change()

'Primero exige que sea texto

If IsNumeric(nombre) And _
nombre.Text <> "" Then
Beep
MsgBox "DEBES INTRODUCIR SOLO TEXTO"
nombre.Text = ""
nombre.SetFocus
End If

'solo mayusculas

nombre.Text = UCase(nombre.Text)
nombre.SelStart = Len(nombre)

 

NumeroDatos = Hoja1.Range("A" & Rows.Count).End(xlUp).Row
Me.Lista = Clear
Me.Lista.RowSource = Clear


y = 0
For Fila = 1 To NumeroDatos
   descrip = Hoja1.Cells(Fila, 3).Value
          
          If UCase(descrip) Like "*" & UCase(Me.nombre.Value) & "*" Then
          
             Me.Lista.AddItem
             Me.Lista.List(y, 0) = Hoja1.Cells(Fila, 1).Value
             Me.Lista.List(y, 1) = Hoja1.Cells(Fila, 2).Value
             Me.Lista.List(y, 2) = Hoja1.Cells(Fila, 3).Value
             Me.Lista.List(y, 3) = Hoja1.Cells(Fila, 4).Value
             Me.Lista.List(y, 4) = Hoja1.Cells(Fila, 5).Value
             Me.Lista.List(y, 5) = Hoja1.Cells(Fila, 6).Value
             Me.Lista.List(y, 6) = Hoja1.Cells(Fila, 7).Value
             Me.Lista.List(y, 7) = Hoja1.Cells(Fila, 8).Value
             Me.Lista.List(y, 8) = Hoja1.Cells(Fila, 9).Value
             Me.Lista.List(y, 9) = Hoja1.Cells(Fila, 10).Value
             
             y = y + 1
   
             
          End If
             
Next

End Sub
 

Featured Replies

publicado

Hola Luisfer2020, te dejo un ejemplo con tu mismo código un poquito modificado para que puedas filtrar y mostrar más de diez columnas en un listbox haciendo uso del método AddItem y  sin tener que hacer uso de RouSource, prueba y comenta.

GIF.gif

Filtrar y mostrar mas de diez columnas en listbox sin usar RowSource.xlsm

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.