Mensaje si no encuentra información usando listbox
Me ayudas con esta inquietud
Tengo la siguiente macro pero necesito que si no encuentra información genere un mensaje
Gracias
Private Sub CommandButton5_Click()
If Me.txtFiltro1.Value = "" Then Exit Sub
Me.ListBox1.Clear
j = 1
Filas = Sheets("Inventario").Range("A2").CurrentRegion.Rows.Count
For I = 1 To Filas
If LCase(Cells(I, j).Offset(0, 0).Value) Like "*" & LCase(Me.txtFiltro1.Value) & "*" Then
Me.ListBox1.AddItem Cells(I, j)
Me.ListBox1.List(Me.ListBox1.ListCount - 1, 1) = Cells(I, j).Offset(0, 1)
Me.ListBox1.List(Me.ListBox1.ListCount - 1, 2) = Cells(I, j).Offset(0, 2)
Else
End If
Next I
End Sub
1 respuesta
Respuesta de Dante Amor
1