View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Opening the Autofilter dialog box

is this just illustrative or are firstdate and seconddate actually string
variables containing the date in the correct format. If the latter

Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:="=" & firstdate, _
Operator:=xlAnd, Criteria2:="<=" & seconddate

--
Regards,
Tom Ogilvy




"Pops Jackson" wrote:

I have gotten frustrated with trying to get my code to work autofiltering
date ranges.
The code I am using includes:
Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:="=firstdate",
Operator:=xlAnd, Criteria2:="<=seconddate"

The result is that the entire range is hidden.

How can I get the default autofilter dialog to show? I have decided this is
the best solution unless the code I am using can be altered successfully.

Thanks,

Jim
--
Pops Jackson