Thread: macro's problem
View Single Post
  #6   Report Post  
Dave Peterson
 
Posts: n/a
Default macro's problem

Instead of trying this:
Selection.AutoFilter Field:=21, Criteria1:="<="&clng(dateserial(2005,9,30))
maybe you could use the same format as you see in the data:

Selection.AutoFilter Field:=21, _
Criteria1:="<="&format(dateserial(2005,9,30),"dd/mm/yyyy")


Excel/VBA doesn't always play nice with dates.



gerry405 wrote:

Dave

Intially, I thought that your posted code was working but it turns out
that after checking it does not seem to do anything, could you? if you
have time suggest someother way for me to sort on a date or even better
still, having a prompt for inputing the date that need I need to sort on
(as this changes from day to day)

gerry405 Wrote:
Dave,


thank you for your quick response, that code worked a treat...

Alf,

You answered another question that was bugging me, about
Dates/Formating...I thought at first I had a bug in EXCEL ...thanks


--
gerry405
------------------------------------------------------------------------
gerry405's Profile:
http://www.excelforum.com/member.php...o&userid=27939
View this thread:
http://www.excelforum.com/showthread...hreadid=474279


--
gerry405


--

Dave Peterson