pimentamarqu
08-17-2010, 11:27 PM
Dear all,
I've started with VBA a couple of month ago and i'm getting some difficulties creating a code to filter a data base using another cell as a "contain" criteria.
I don't have problems if i use the cell as criteria:
ActiveSheet.Range("$A$6:$AY$5008").AutoFilter Field:=1, Criteria1:=Range("informe_iso!A1")
but if i try to used a cell to filter as "contain" criteria it it will give me a compile error:
ActiveSheet.Range("$A$6:$AY$5008").AutoFilter Field:=1, Criteria1:=*Range("informe_iso!A1")*
ths for your help
I've started with VBA a couple of month ago and i'm getting some difficulties creating a code to filter a data base using another cell as a "contain" criteria.
I don't have problems if i use the cell as criteria:
ActiveSheet.Range("$A$6:$AY$5008").AutoFilter Field:=1, Criteria1:=Range("informe_iso!A1")
but if i try to used a cell to filter as "contain" criteria it it will give me a compile error:
ActiveSheet.Range("$A$6:$AY$5008").AutoFilter Field:=1, Criteria1:=*Range("informe_iso!A1")*
ths for your help