christchaaya
Board Regular
- Joined
- Apr 5, 2013
- Messages
- 86
Hello everyone.
I ran this code and it worked great until I took a look at the table and the filter on the headers were disappeared
. I thought that the table has converted into a range but nope ... What could be the problem? Did i made mistakes in the code ?
I ran this code and it worked great until I took a look at the table and the filter on the headers were disappeared
Code:
R
dim x as range
dim y as filter
nge("IV3").End(xlToLeft).Select
Set x = ActiveCell
ActiveSheet.ListObjects("Tabla1").Range.AutoFilter Field:=11, Criteria1:=x
ActiveSheet.ListObjects("Tabla1").Range.AutoFilter Field:=5, Criteria1:="permiso sindical*"
On Error Resume Next
Set y = ActiveSheet.ListObjects("Tabla1").Range.AutoFilter
On Error GoTo 0
If Not y Is Nothing Then
Range("p" & Cells.Rows.Count).End(xlUp).Select
Range(Selection, "p12").SpecialCells(xlCellTypeVisible) = "x"
ActiveSheet.ListObjects("Tabla1").Range.AutoFilter Field:=5
End If
ActiveSheet.ListObjects("Tabla1").Range.AutoFilter Field:=5, Criteria1:="Reunion solicitada por empresa*"
On Error Resume Next
Set y = ActiveSheet.ListObjects("Tabla1").Range.AutoFilter
On Error GoTo 0
If Not y Is Nothing Then
Range("q" & Cells.Rows.Count).End(xlUp).Select
Range(Selection, "q12").SpecialCells(xlCellTypeVisible) = "x"
ActiveSheet.ListObjects("Tabla1").Range.AutoFilter Field:=11
ActiveSheet.ListObjects("Tabla1").Range.AutoFilter Field:=5
End If