+ Reply to Thread
Results 1 to 1 of 1

Autofilter generates #REF! when run but works correctly when stepped through

  1. #1
    Forum Contributor
    Join Date
    03-05-2007
    Location
    Palm Bay, FL, was Colorado Springs, CO for ten years!
    MS-Off Ver
    365
    Posts
    534

    Autofilter generates #REF! when run but works correctly when stepped through

    When I allow the following autofilter to simply run it does not copy the data over, but if i place a breakpoint on the autofilter and then step through the code it works fine.

    Please Login or Register  to view this content.
    Anyone know why i am running into this problem?

    Edit: Hold off working this please - I believe the problem is actually being caused by some cells just under the range copied over having calculations in them. When i run the code over, those cells do not get deleted and this is when the problem occurs. I am going to try making certain everything in the target copy area is blown away and then re-run the code. Will advise...

    Edit: That was it. As they say; "My bad"...
    Last edited by brucemc777; 09-05-2014 at 08:52 AM. Reason: Noted

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Macro works correctly from VBE but not from button
    By tone640 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-15-2012, 10:45 AM
  2. Macro works when stepped through but not when run (Excel03)
    By AdLoki in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-23-2011, 01:27 PM
  3. Setting AutoFilter via VBA generates error?
    By Rick_Stanich in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-20-2010, 10:38 AM
  4. AutoFilter method of Range class failed - Yet autofilter works.
    By Carlsbergen in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-25-2009, 05:43 PM
  5. [SOLVED] Works when stepped-through, but errors when macro ran
    By johnhildreth@citynet.net in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-21-2006, 09:50 PM

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