Hi guys, I have this code, this makes an autofilter in real time, all right, but when I put some number for filter in column with numbers this show nothing, whats wrong? pls help
Code
'
Private Sub TextBox1_Change()
Dim Criterio As String
Dim Columna As Integer
If Hoja1.TextBox1.Value <> "" Then
If Hoja1.ComboBox1.Value = "" Then Exit Sub
If Hoja1.CheckBox1.Value = True Then
Criterio = Hoja1.TextBox1.Value & "*"
Else
Criterio = "*" & Hoja1.TextBox1.Value & "*"
End If
Columna = Hoja1.ComboBox1.ListIndex + 1
Range("A2").CurrentRegion.AutoFilter Field:=Columna, Criteria1:=Criterio
Else
Criterio = ""
Range("A2").CurrentRegion.AutoFilter
End If
Display More