+ Reply to Thread
Results 1 to 4 of 4

creating a variable drop autofilter

  1. #1
    Registered User
    Join Date
    01-19-2009
    Location
    England
    MS-Off Ver
    Excel 365
    Posts
    66

    creating a variable drop autofilter

    Hi

    i am trying to create a variable autofilter, in VBA, but having some issues with it, when i recorded it, got the following:

    HTML Code: 
    so i changed the variable and it still worked:
    HTML Code: 
    it stopped working when i go to change the dates to variables:


    HTML Code: 
    any ideas as to what i am doing wrong????????

  2. #2
    Valued Forum Contributor
    Join Date
    10-26-2008
    Location
    Birmingham, UK
    MS-Off Ver
    All versions up to 2010
    Posts
    1,025

    Re: creating a variable drop autofilter

    Hi
    Try changing ".Range("a1")" to ".Range("a1").Value etc.
    Good luck.
    Tony

  3. #3
    Registered User
    Join Date
    01-19-2009
    Location
    England
    MS-Off Ver
    Excel 365
    Posts
    66

    Re: creating a variable drop autofilter

    tried that, the filter works, but doesnt select any critria

  4. #4
    Valued Forum Contributor
    Join Date
    10-26-2008
    Location
    Birmingham, UK
    MS-Off Ver
    All versions up to 2010
    Posts
    1,025

    Re: creating a variable drop autofilter

    Hi
    Can you post a copy of your worksheet with basic rules on how it should work.
    Tony

+ 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. Call a constant/variable by creating another variable
    By pienaaj in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-12-2013, 10:36 AM
  2. Autofilter with a variable name
    By ABaggins in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-19-2012, 03:27 PM
  3. Creating multiple Drop downs menus that are variable
    By Arnoldtp in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-13-2012, 09:20 AM
  4. Replies: 8
    Last Post: 09-22-2011, 03:47 PM
  5. [SOLVED] creating autofilter and using them thanks VBA
    By Maileen in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-02-2005, 08:06 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