millhouse123
Active Member
- Joined
- Aug 22, 2006
- Messages
- 335
I have this line of code that filter on 2 criteria. I currently have one of the criteria set as the date and it is hard coded as 8/22/2006. This date changes daily.
What I want todo is replace the date with a variable but when I do it gives me an error.
Basically I have Date = 9/19/2006 or whatever date it might be. What I want to do is put the variable in below instead of the hard coded date. How can I do this.
Thanks
Selection.AutoFilter Field:=8, Criteria1:="DONE"
Range("W5").Select
Selection.AutoFilter Field:=23, Criteria1:="> 8/22/2006", Operator:=xlAnd
What I want todo is replace the date with a variable but when I do it gives me an error.
Basically I have Date = 9/19/2006 or whatever date it might be. What I want to do is put the variable in below instead of the hard coded date. How can I do this.
Thanks
Selection.AutoFilter Field:=8, Criteria1:="DONE"
Range("W5").Select
Selection.AutoFilter Field:=23, Criteria1:="> 8/22/2006", Operator:=xlAnd