LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Macro runtime error 1004 with Autofilter

I have a macro that invokes Autofilter, however, when I try to run it, after
receiving input from the user, it fails at the Autofilter command. The
message is Autofilter method of range class failed. Can someone help me with
this? This is the entire macro from the start where it selects a range and
clears it, then selects the range for the filter.

Range("A3").Select
Selection.CurrentRegion.Select
Selection.Clear
Sheets("Satisfaction input sheet").Select
Range("A4").Select
Selection.CurrentRegion.Select
Selection.Copy
Sheets("query").Select
Range("A3").Select
ActiveSheet.Paste
Application.CutCopyMode = False
c1 = InputBox("Enter Date From")
c2 = InputBox("Enter Date To")
Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:="=" & c1 & ",",
Criteria2:="<=" & c2
Range("A3").Select
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
runtime error 1004 HELP PLS Marcelo P Excel Discussion (Misc queries) 2 May 23rd 07 08:56 PM
What causes runtime error 1004? [email protected] Excel Discussion (Misc queries) 4 October 27th 05 07:15 PM
runtime error 1004 valdesd Excel Discussion (Misc queries) 0 October 12th 05 05:30 PM
runtime error 1004 valdesd Excel Discussion (Misc queries) 2 October 12th 05 03:20 PM
Excel 2003 Macro Error - Runtime error 1004 Cow Excel Discussion (Misc queries) 2 June 7th 05 01:40 PM


All times are GMT +1. The time now is 08:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"