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.

De ComboBox de 2 columnas a Listbox de 3 columnas

publicado

Tengo un comboBox con 2 Columnas y al pasar los datos a un ListBox, solo me pasa el dato de una de las columnas. Asignar una prenda y la cantidad de prendas.

en el Formulario tengo lo siguiente

Private Sub UserForm_Initialize()

Dim L as Long

With Hoja7

      Me.ComboProd = Clear       ' ComboProd es el nombre del Combo

     Do while   . Cells(L,1)  <>""

            ComboProd.AddItem

            ComboProd.List(ComboProd.ListCount -1, 0) =.Cells(L, 1)

            ComboProd.List(ComboProd.ListCount -1, 1)=.Cells(L, 1)

    L = L + 1

   Loop

End With

End Sub

 

Se añaden los datos al ListBox a través de Un CommandButton y tengo este código

Private Sub Validar_Click()

With ListaProd

    .ColumnCount =3

    .Columnswidths =   "40;120;50"

    . AddItem

    . List(.ListCount -1, 0) = ComboProd

    .List(.ListCount -1, 1 ) =  ' Aquí debería de aparecer la segunda columna del Combo y no se como hacerlo

    .List(.ListCount -1, 2) = TextCantProd  ' Donde este es un textBox para meter la cantidad de prendas

End With

 

Gracias

Featured Replies

publicado
 .List(.ListCount -1, 1 )  = ComboProd.List(ComboProd.ListIndex, 1)

 

publicado
  • Autor
En 17/11/2020 at 19:00 , Antoni dijo:

 .List(.ListCount -1, 1 )  = ComboProd.List(ComboProd.ListIndex, 1)

 

muchísimas gracias, enredando se aprende, pero hay veces... al final aprenderé. 

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.