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.

Bucle para llenar varios listbox

publicado

Hola amigos: Acudo nuevamente para solicitar su ayuda, tengo el siguiente codigo que llena un listbox llamado T3 y lo ordena alfabeticamente y todo funciona bien pero tengo otros listboxs T4, T5,....T10 que quisera llenarlos con el mismo rango de datos, ¿es posible hacerlo con un bucle? o de que otra forma puedo hacerlo para no tener que repetir el mismo codigo, tantas veces como listbox tengo que llenar. Espero haberme dado a entender.

saludos

Private Sub CommandButton1_Click()
Set SourceSheet = Worksheets("sustratos")
LastRow = SourceSheet.Cells(Rows.Count, 2).End(xlUp).Row
On Error Resume Next
Set Coll = New Collection

With T3
.Clear
For Each Cell In SourceSheet.Range("b2:b" & LastRow)
If Len(Cell.Value) <> 0 Then
Err.Clear
Coll.Add Cell.Text, Cell.Text
If Err.Number = 0 Then .AddItem Cell.Text
End If
Next Cell

blnUnsorted = True
Do
blnUnsorted = False
For i = 0 To UBound(.List) - 1
If .List(i) > .List(i + 1) Then
temp = .List(i)
.List(i) = .List(i + 1)
.List(i + 1) = temp
blnUnsorted = True
Exit For
End If
Next i
Loop While blnUnsorted = True
.ListIndex = 0
End With
End Sub
[/CODE]

Featured Replies

No hay posts para mostrar

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.