Re: Filter Date Field by month using VBA



Hi Stuart

You're not the silly one - it was me.
In copying and pasting, I wiped out the 1 after criteria in my posting
to you.
Glad you spotted it and got it all resolved.

--
Regards

Roger Govier


"Stuart Grant" <sagrantatbluewindotch> wrote in message
news:440db90d$1_2@xxxxxxxxxxxxxxxxxx
Roger
Oh silly me! As you will see in my previous messages. I had -
Selection.autofilter Fields:= 9, Criteria = Mon
It has to be Criteria1 not just Criteria, even if there is only one.
Works perfectly now. Thanks for your help.
Stuart


"Stuart Grant" <sagrantatbluewindotch> wrote in message
news:440d4df5$1_3@xxxxxxxxxxxxxxxxxx
Roger
Yes. autofilter is applied to all columns and the Month column is I
or 9.
Debug-AddWatch confirms Mon is an integer - in my trials 2.
I'm baffled.
I have to stop now but this afternoon I'll record a macro doing it
manually and see what comes.
Stuart




.


Quantcast