Signo moneda en listbox de acuerdo a código de matriz
De acuerdo a su experticia me podrían ayudar colocando el signo moneda a un listbox muchas gracias...
Option Explicit ' Dim a As Variant 'Al inicio del código ' Private Sub TextBox1_Change() Call FilterData End Sub ' Sub FilterData() Dim txt1 As String, txt2 As String, txt3 As String Dim b As Variant Dim i As Long, j As Long, k As Long ' ReDim b(1 To UBound(a, 1), 1 To UBound(a, 2)) ListBox1.Clear For i = 1 To UBound(a, 1) If TextBox1.Value = "" Then txt1 = a(i, 1) Else txt1 = TextBox1.Value If LCase(a(i, 1)) Like "*" & LCase(txt1) & "*" Then j = j + 1 For k = 1 To UBound(a, 2) b(j, k) = a(i, k) Next End If Next i If j > 0 Then ListBox1.List = b End Sub ' Private Sub userform_initialize() 'Ajusta columna "K" para la última columna con datos 'Ajusta celda "A2" con la celda de inicio de datos 'Ajusta Hoja1 con el nombre de tu hoja 'El filtro funciona buscando los datos en la columna "A" a = Sheets("Hoja1").Range("A2:K" & Sheets("Hoja1").Range("A" & Rows.Count).End(3)).Value ListBox1.ColumnCount = UBound(a, 2) End Sub
1 Respuesta
Respuesta de Dante Amor
1