Estoy filtrando datos desde otra hoja, con varios textBox ubicados uno en cada columna de una tabla.
La segunda columna contiene Fechas y no se cual es el codigo que debería llevar ese textbox para que funcione igual que los demas.
Este es el código utilizado:
Private Sub Filtrar()
Application.ScreenUpdating = False
uf = Sheets("Datos").[A65536].End(xlUp).Row
Sheets("Datos").Range("A1:K" & uf).AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Range("A1:K2"), CopyToRange:=Range("A4:K4"), Unique:=False
Application.ScreenUpdating = True
End Sub
Private Sub TextBox1_KeyUp(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
[A2].Value = "*" & TextBox1.Text & IIf(TextBox1.Text = "", "", "*")
If [A2].Value = "*" Then [A2].Value = ""
Call Filtrar
End Sub
Private Sub TextBox2_KeyUp(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
[B2].Value = "*" & TextBox2.Text & IIf(TextBox2.Text = "", "", "*")
If [B2].Value = "*" Then [B2].Value = ""
Call Filtrar
End Sub
Private Sub TextBox3_KeyUp(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
[C2].Value = "*" & TextBox3.Text & IIf(TextBox3.Text = "", "", "*")
If [C2].Value = "*" Then [C2].Value = ""
Call Filtrar
End Sub
etc...
[/CODE]
Desde ya muchas gracias!!
Victor
Featured Replies
Archivado
Este tema está ahora archivado y está cerrado a más respuestas.
Estimados:
Estoy filtrando datos desde otra hoja, con varios textBox ubicados uno en cada columna de una tabla.
La segunda columna contiene Fechas y no se cual es el codigo que debería llevar ese textbox para que funcione igual que los demas.
Este es el código utilizado:
Desde ya muchas gracias!!
Victor