Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Newsgroup Archive
Excel Newsgroups
Excel Programming
how to use variable that should be in "quotes"
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Tim, post: 6337739"] Thanks again Jim. I still doesn't work, but now i know why (still don't know how to fix it though!) i tried manually custom filtering and it displayed what the VBA was trying to do... in the inputbox, i entered '1/6' meaning '1st June 2008' but the autofilter is showing '6th January 2008' any ideas how to fix that?! I'm using the following syntax to set & use the date variable: - == Dim rng1, rng2 rng1 = Format(CDate(InputBox("from")), "dd/mm/yyyy") rng2 = Format(CDate(InputBox("to")), "dd/mm/yyyy") Selection.AutoFilter Field:=3, Criteria1:="<=" & rng1, Operator:=xlAnd, Criteria2:=">=" & rng2 === cheers, tim [/QUOTE]
Verification
Post reply
Forums
Archive
Newsgroup Archive
Excel Newsgroups
Excel Programming
how to use variable that should be in "quotes"
Top