LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Advanced Filter Error 1004

Hi All,

I'm sure there must be an easy answer to this!?

Using Excel 2007

I have reorded a simple macro to update an advanced filter when a command
button is clicked. While recording the macro the advanced filter works and
updates correctly. When I assign the macro to my button I get:

Run-time error '1004'
Method 'Range' of object '_Whorksheet' failed

My code is:

Private Sub CommandButton1_Click()

Sheets("Assignments").Select
Range("Database").AdvancedFilter Action:=xlFilterCopy,
CriteriaRange:=Range _
("Filter"), CopyToRange:=Range("J1:Q1"), Unique:=False

End Sub

The range 'Database' is on my 'assignments' sheet and refers to columns A:H
The range 'Filter' is on a different sheet and contains my critera

I'm sure I have used this sort of thing before in Excel 2003 without prblem...

TIA for your help

Matthew

 
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
Error msg on Advanced Filter Helen Excel Discussion (Misc queries) 0 April 3rd 08 04:52 PM
Advanced Filter Error Floyd Bates[_2_] Excel Programming 1 July 6th 06 07:19 PM
Advanced Filter Error Claret Excel Programming 2 January 24th 06 03:40 PM
advanced filter error 1004 Tove Excel Programming 2 February 28th 05 07:22 PM
Error on advanced filter vba excel - 1004 Rachel Curran Excel Programming 1 June 4th 04 02:33 AM


All times are GMT +1. The time now is 10:30 AM.

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"