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.

Cargar 2 fila de un lixtbox a Textbox

publicado

Hola a todos,  aqui le presento  una sugerencia.

Es posible poder pasar datos 2 o mas filas de un Listbox a varios Textbox.

Private Sub lbxListado_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
   'CARGAR DATOS A CAJA DE TEXTO
   INDICE = Me.lbxListado.ListIndex
     tbxNombre.Value = lbxListado.List(INDICE, 0)
     tbxPrecio.Value = lbxListado.List(INDICE, 1)
     cbxUnidad.Value = lbxListado.List(INDICE, 2)
    
End Sub

Aqui consigo pasar los datos de una fila, pero me gustaria poder pasar 2 o mas fila si es posible.

Featured Replies

publicado

Sube tu archivo y pon un ejemplo de lo que quieres.

publicado
  • Autor

Okey, gracias, eso hare

 

publicado

Saludos cordiales.

En lo que se comparte el ejemplo y en base a lo explicado hasta ahora, considero que necesitarías iterar sobre las filas seleccionadas en tu ListBox.

Algo así:

Private Sub lbxListado_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
    'CARGAR DATOS A CAJAS DE TEXTO
    Dim i As Integer
    For i = 0 To lbxListado.ListCount - 1
        If lbxListado.Selected(i) Then
            tbxNombre.Value = tbxNombre.Value & " " & lbxListado.List(i, 0)
            tbxPrecio.Value = tbxPrecio.Value & " " & lbxListado.List(i, 1)
            cbxUnidad.Value = cbxUnidad.Value & " " & lbxListado.List(i, 2)
        End If
    Next i
End Sub

Este ejemplo el código agrega los valores de todas las filas seleccionadas en el ListBox a los TextBox correspondientes. Toma en cuenta que si deseas que los valores se agreguen en TextBox diferentes, necesitas tener más TextBox disponibles y asignar los valores que le correspondan. Si lo ajustas, podrías usarlo para que se adapte a lo que necesitas.

 

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.