Results 1 to 4 of 4

Use a userform to pass values from combo box to autofilter with custom filter for dates

Threaded View

  1. #3
    Forum Contributor
    Join Date
    08-02-2012
    Location
    Austria
    MS-Off Ver
    Excel 2007
    Posts
    457

    Re: Use a userform to pass values from combo box to autofilter with custom filter for date

    Hi all,

    I have a problem passing a value from a cell into the custom filter in autofilter.
    Can some one pleases look at the below code and let me know where I go wrong? (the criteria for field 2 works as it should).

    Sub SelectionFilter()
    
        Rows("6:6").Select
        Selection.AutoFilter
        Selection.AutoFilter Field:=2, Criteria1:=Range("B3")
        Selection.AutoFilter Field:=1, Criteria1:=">=" & Range("C3"), Operator:=xlAnd, Criteria2:="<=" & Range("D3")
    End Sub
    Thank you in advance.

    Greetings.
    Last edited by Megatronixs; 10-29-2013 at 08:26 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Autofilter Custom Filter VBA
    By FLani in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-18-2013, 04:30 AM
  2. Pass Date value from custom calendar control to Userform Combo Box:
    By rvc81 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-23-2013, 12:59 AM
  3. Pass a simple value from custom UserForm to VBA module
    By MSieg in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-23-2012, 04:25 AM
  4. filter from combo box? (not autofilter)
    By Excel idiot in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-19-2007, 05:31 PM
  5. Pass Combo Values to an ODBC Parameter........
    By Jonathan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-23-2005, 08:05 AM

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