Listbox con más de 10 de columnas
Tengo un pequeño problemita, tengo un formulario con listbox el cual requiero que me salgan 15 columnas pero este solo me salen 10 como máximo
Tengo el siguiente condigo al iniciar el formulario
Private Sub UserForm_Activate()
ThisWorkbook.Sheets(Hoja1.Name).Activate
   Range("C4").Select
    Dim fila As Long
    Application.DisplayAlerts = False
    Application.ScreenUpdating = False
    Set b = ThisWorkbook.Sheets(Hoja1.Name)
    uf = b.Range("C" & Rows.Count).End(xlUp).Row
    uc = b.Cells(4, Columns.Count).End(xlToLeft).Address
    wc = Mid(uc, InStr(uc, "$") + 1, InStr(2, uc, "$") - 2)
    With Me.ListBox1
        .ColumnHeads = True
        .ColumnCount = 15
        ListBox1.RowSource = b & "!B3:Q" & uc
        .ColumnWidths = "200 pt;120 pt;35 pt;50 pt;50 pt;50 pt;80 pt;50 pt;50 pt;35 pt;50 pt;50 pt;50 pt;50 pt;50 pt"
        .RowSource = "C4:" & wc & uf
    End With
End Suble digo 15 pero me muestra 10 siempre
tambien en el textbox1 le digo 15 y siempre me muestra 10
On Error Resume Next
Set b = Sheets(Hoja1.Name)
uf = b.Range("B" & Rows.Count).End(xlUp).Row
If Trim(TextBox4.Value) = "" Then
     'AQUI YO PUESE ESTO
   Set b = Sheets(Hoja1.Name)
uf = b.Range("B" & Rows.Count).End(xlUp).Row
uc = b.Cells(4, Columns.Count).End(xlToLeft).Address
wc = Mid(uc, InStr(uc, "$") + 1, InStr(2, uc, "$") - 2)
With Me.ListBox1
    .ColumnCount = 16
    .ColumnWidths = "200 pt;120 pt;35 pt;50 pt;50 pt;50 pt;80 pt;50 pt;50 pt;35 pt;50 pt;50 pt;50 pt"
    .RowSource = "C4:" & wc & uf
End With
'AQUI TERMINE
   Exit Sub
End If
b.AutoFilterMode = False
Me.ListBox1 = Clear
Me.ListBox1.RowSource = Clear
'''''''''''''''''''''''''''
For i = 4 To uf
   strg = b.Cells(i, 11).Value
  If UCase(strg) Like "*" & UCase(TextBox4.Value) & "*" Then
       Me.ListBox1.AddItem b.Cells(i, 3) 'NOMBRE
       Me.ListBox1.List(Me.ListBox1.ListCount - 1, 1) = b.Cells(i, 4) 'AREA
       Me.ListBox1.List(Me.ListBox1.ListCount - 1, 2) = b.Cells(i, 5) 'INCIDENCIA SALIDA A COMER
       Me.ListBox1.List(Me.ListBox1.ListCount - 1, 3) = Format(b.Cells(i, 6), "hh:mm AM/PM") ' HORA SALIDA A COMER
       Me.ListBox1.List(Me.ListBox1.ListCount - 1, 4) = Format(b.Cells(i, 7), "hh:mm AM/PM") ' HORA DE ENTRADA ACOMER
       Me.ListBox1.List(Me.ListBox1.ListCount - 1, 5) = Format(b.Cells(i, 8), "hh:mm") ' MINUTOS GENERADOS
       Me.ListBox1.List(Me.ListBox1.ListCount - 1, 6) = b.Cells(i, 9) ' FECHA
       Me.ListBox1.List(Me.ListBox1.ListCount - 1, 7) = Format(b.Cells(i, 10), "MMMM") 'MES
       Me.ListBox1.List(Me.ListBox1.ListCount - 1, 8) = b.Cells(i, 11) ' SEMANA
       Me.ListBox1.List(Me.ListBox1.ListCount - 1, 9) = b.Cells(i, 12) 'INCIDENCIA ENTRADA A COMER
       Me.ListBox1.List(Me.ListBox1.ListCount - 1, 10) = Format(b.Cells(i, 13), "hh:mm AM/PM") ' HORA ENTRADA
       Me.ListBox1.List(Me.ListBox1.ListCount - 1, 11) = Format(b.Cells(i, 14), "hh:mm AM/PM") ' HORA SALIDA
       Me.ListBox1.List(Me.ListBox1.ListCount - 1, 12) = Format(b.Cells(i, 15), , "hh:mm") ' HORAS TRABAJADAS
       'Me.ListBox1.List(Me.ListBox1.ListCount - 1, 13) = Format(b.Cells(i, 16), "hh:mm")
   End If
Next i
If ListBox1.ListCount > 0 Then
TextBox2.Value = Empty
TextBox3.Value = Empty
TextBox1.Value = Empty
'MsgBox "si"
Else
MsgBox "Si No Se Encuentra la SEMANA Puede Ser Por: 1.- No Esta Registrado En La Base De Datos O 2.- La Busqueda Es Incorrecta. Intenta de Nuevo", vbExclamation, "INFORMACIÓN UTIL"
TextBox4.Value = Empty
End If
Me.ListBox1.ColumnWidths = "200 pt;120 pt;35 pt;50 pt;50 pt;50 pt;80 pt;50 pt;50 pt;35 pt;50 pt;50 pt;50 pt"me pueden ayudar a solucionar este detalle
3 respuestas
                    Respuesta de Adriel Ortiz Mangia                
                
        
        
            
                1
              
        
        
        
            
            
        
    
                
                    Respuesta de Abraham Valencia                
                
        
        
            
                1
              
        
        
        
            
            
        
    
                
                    Respuesta de Programar Excel                
                
        
        
            
                1
              
        
        
        
            
            
        
    
                

 
        
