+ Reply to Thread
Results 1 to 2 of 2

VBA Auto Filter Error

  1. #1
    Registered User
    Join Date
    Washington, DC
    MS-Off Ver

    Angry VBA Auto Filter Error

    I've written code to compare the data included in 2 huge Excel files and while running the comparison code I encounter a "Run time error '91' - Object Variable or With block variable not set". Anyone know what my error is? Please see picture below:

    excel vba error.jpg


  2. #2
    Forum Guru bakerman2's Avatar
    Join Date
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016

    Re: VBA Auto Filter Error

    Isn't the AutoFilter.Sort command only available from XL2013 and upwards ?
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

+ 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. VBA auto filter error handling
    By michaelcouch87 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-23-2014, 09:13 AM
  2. [SOLVED] Auto Filter error in VBA no idea why its happening
    By joshnathan in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-10-2013, 08:57 AM
  3. Auto Filter Method in Range failed - error
    By BorisMKD in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-17-2009, 05:24 AM
  4. Auto Filter Sorting Error
    By sinspawn56 in forum Excel General
    Replies: 4
    Last Post: 03-30-2009, 05:59 PM
  5. Run time error 1004-Auto filter
    By jad70 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-12-2009, 12:45 PM
  6. Auto Filter Paste Error
    By eckert1961 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 08-27-2008, 05:03 PM
  7. Replies: 1
    Last Post: 09-29-2005, 04:05 PM
  8. Auto Filter Error
    By richardreye in forum Excel General
    Replies: 0
    Last Post: 01-05-2005, 11:17 PM

Tags for this Thread


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