Foros del Web » Soporte técnico » Ofimática »

Contar items de un listbox

Estas en el tema de Contar items de un listbox en el foro de Ofimática en Foros del Web. APENAS ME ESTOY ADENTRANDO EN EL TEMA DE LAS MACROS EN EXCELL Y NECESITO CONTAR LOS ITEMS DE UN LISTBOX EL CUAL LLENO CON EL ...
  #1 (permalink)  
Antiguo 24/11/2010, 15:39
 
Fecha de Ingreso: noviembre-2010
Mensajes: 2
Antigüedad: 13 años, 5 meses
Puntos: 0
Contar items de un listbox

APENAS ME ESTOY ADENTRANDO EN EL TEMA DE LAS MACROS EN EXCELL Y NECESITO CONTAR LOS ITEMS DE UN LISTBOX EL CUAL LLENO CON EL CODIGO SGTE., AYUDEMNE POR FAVOR...GRACIAS

Private Sub CommandButton1_Click()

With Hoja2
.[C2] = "*" & TextBox1 & "*"
.[A1].CurrentRegion.AdvancedFilter _
Action:=xlFilterCopy, CriteriaRange:=.[C1:C2], _
CopyToRange:=.[D1], Unique:=False

If .[D2] = Empty Or TextBox1 = Empty Then

ListBox1 = Empty

Else

Dim Lrange As Range
Dim x As Variant

Set Lrange = Hoja2.Range("D2:D150")

For Each x In Lrange

ListBox1.AddItem x.Value

Next x

End If
End With


End Sub
  #2 (permalink)  
Antiguo 25/11/2010, 09:30
Avatar de Monimo  
Fecha de Ingreso: noviembre-2007
Ubicación: Mexico Df
Mensajes: 742
Antigüedad: 16 años, 5 meses
Puntos: 69
Respuesta: Contar items de un listbox

ListBox1.ListCount
__________________
La verdad es que lo que no quisiera dejar de hacer nunca (a parte de comer) es programar

Etiquetas: contar, items, listbox
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 18:04.