Results 1 to 2 of 2

Criteria1 won't work with dates?

Threaded View

  1. #1
    Registered User
    Join Date
    11-04-2004
    Location
    Athens
    MS-Off Ver
    2019
    Posts
    48

    Criteria1 won't work with dates?

    Hi all, i got a data table with filters.

    when i try to get filter criteria for a non-date field with the following code all is ok
    Dim lo As ListObject
    Set lo = Worksheets("xxx").ListObjects("yyy")
    if lo.AutoFilter.Filters(12).on = True then
       txt = lo.AutoFilter.Filters(12).Criteria1
    end if
    but when i try to get the same info for a date field i am getting Application defined or object defined error on the last line

    lo.AutoFilter.Filters(12).on
    returns True but .Criteria1 gets this error

    any ideas??
    Last edited by S@S; 07-31-2019 at 04:32 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. MAXIFS criteria1 question
    By John-TS in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-20-2020, 04:35 AM
  2. Using variable for Autofilter Criteria1
    By ateestructural in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-18-2017, 08:39 AM
  3. [SOLVED] how to filter Criteria1 which Contains range
    By vinod2802 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-15-2015, 04:37 AM
  4. [SOLVED] SUMIF criteria1 OR criteria2
    By ft9a in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-21-2013, 02:55 PM
  5. How to set Filter.Criteria1 by code?
    By Gabor in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-07-2011, 10:25 PM
  6. Replies: 5
    Last Post: 06-24-2010, 06:21 AM
  7. [SOLVED] Counting dates in multiple work sheets and work books
    By Savage in forum Excel General
    Replies: 0
    Last Post: 12-19-2005, 07:45 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