+ Reply to Thread
Results 1 to 4 of 4

delete with autofilter not working

  1. #1
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,054

    delete with autofilter not working

    As a repeatable item I do an autofilter and then delete the visible rows under the header. The macro below is what I usually use. Today I started getting an error on the "delete" line, when using it, so the commented out code is the backup line I tried to use. Either way, I get an application-defined or object-defined error code 1004 on the "delete line". It's working in one workbook so far out of two I've tested, and not working in the other. I'd appreciate any clues as to why it may not be working.
    Please Login or Register  to view this content.
    Last edited by jomili; 11-04-2011 at 04:40 PM.

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: delete with autofilter not working

    jomili,

    It looks like you're filtering column D for "*2010", give this a try:
    Please Login or Register  to view this content.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,054

    Re: delete with autofilter not working

    Nice try, but no go. The autofilter part is working fine, the problem comes in when I try to delete. We got the same error code on this line:
    Please Login or Register  to view this content.
    I've verified that "Protection" is turned off for the sheet. Is there anything else that would make the "delete" not work? Maybe, for instance, that the number of filled rows in this worksheet (sorry, I just now noticed) is 65536?

  4. #4
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,054

    Re: delete with autofilter not working

    Okay, I went around my problem by going back to the source and seeing what I could do there to limit the number of lines coming in. Doing that, my autofilter deletion routine runs just fine now. So, I ASSUME it's the max rows that's the cause of my problems.

    So, I guess now I need to make a quick way to be alerted if my active sheet has the max of its rows filled so I can develop work-arounds before other stuff starts failing.

    Thanks,
    John

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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