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.

Filtrar datos de un listbox

publicado

Mi consulta es la siguiente: tengo un listbox dentro de un userform en el cual se listan los archivos que se encuentran dentro de una carpeta mediante la siguiente macro:

ListBox1.Clear

Set fso = CreateObject("Scripting.FileSystemObject")

Ruta = ThisWorkbook.Path

Set Carpeta = fso.GetFolder(Ruta)

Set ficheros = Carpeta.Files

For Each Archivo In ficheros

ListBox1.AddItem Archivo.Name

Next Archivo

Necesito que en otro listbox (listbox2) se muestren los items del listbox1 que cumplan con la condición de empezar con la letra "P".

Agradecería que me dieran una idea de como hacerlo.

Desde ya muchas gracias

Featured Replies

publicado

ListBox1.Clear: ListBox2.Clear

Set fso = CreateObject("Scripting.FileSystemObject")

Ruta = ThisWorkbook.Path

Set Carpeta = fso.GetFolder(Ruta)

Set ficheros = Carpeta.Files

For Each Archivo In ficheros

ListBox1.AddItem Archivo.Name

If Left(Archivo.Name, 1) = "P" Then ListBox2.AddItem Archivo.Name

Next Archivo

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.