+ Reply to Thread
Results 1 to 7 of 7

AdvancedFilter Error 1004 - works in one Excel 2003 workbook but not another

  1. #1
    Registered User
    Join Date
    04-16-2013
    Location
    Frankfurt, Germany
    MS-Off Ver
    Excel 2003
    Posts
    4

    AdvancedFilter Error 1004 - works in one Excel 2003 workbook but not another

    Hi,

    I'm new to VBA so generally put together any macros I need by searching forums for other people with similar problems / recording a macro and customising.

    I've got a pretty basic macro I'm using to create unique lists which I want to use for drop-downs. I have to work in Excel 2003 unfortunately as the users don't have anything newer.

    This macro works with absolutely no problems in an otherwise empty Excel 2003 test workbook, but when I use it in the main workbook where I actually need it, I get a 1004 error, saying the advanced filter method of the range object couldn't run (Have to back-translate from German there, so that may not be the precise English wording).



    Please Login or Register  to view this content.

    What settings in Excel 2003 could be preventing this from working in one workbook when it works fine in another?

    Thanks in advance for anyone with any ideas about what could be causing this!
    Last edited by Drewzen; 04-18-2013 at 03:33 AM.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,524

    Re: AdvancedFilter Error 1004 - works in one Excel 2003 workbook but not another

    You propbaly need to add variables,
    Try this,
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-16-2013
    Location
    Frankfurt, Germany
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: AdvancedFilter Error 1004 - works in one Excel 2003 workbook but not another

    Hi Dave,

    thanks for the quick response.

    Unfortunately, adding variables hasn't helped - still getting the identical error message.

  4. #4
    Registered User
    Join Date
    12-15-2010
    Location
    Hyderabad
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: AdvancedFilter Error 1004 - works in one Excel 2003 workbook but not another

    Hi Drewzen,

    I have copied your code and tested with new workbook. It's working perfectly for me.
    Just make sure once the Sheet Names(Database,AuxList) are correct in new workbook where you are trying.

    Thanks,
    Ramana

  5. #5
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: AdvancedFilter Error 1004 - works in one Excel 2003 workbook but not another

    do you have anything in B5 on the target sheet in the real workbook?
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  6. #6
    Registered User
    Join Date
    04-16-2013
    Location
    Frankfurt, Germany
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: AdvancedFilter Error 1004 - works in one Excel 2003 workbook but not another

    Hi Ramana,

    the names are right, and I also got it to work in another sheet ... but I think I've solved it.

    It appears the error message was coming up because I already had a header in the location I was trying to copy it to. If I delete the header (or move the target range down one cell) then it works.

    Thanks for your help!

  7. #7
    Registered User
    Join Date
    04-16-2013
    Location
    Frankfurt, Germany
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: AdvancedFilter Error 1004 - works in one Excel 2003 workbook but not another

    Hi JosephP, that was the problem! Saw your message just as I figured it out myself

    Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1