+ Reply to Thread
Results 1 to 2 of 2

Get Table sort and filter properties (VBA)

  1. #1
    Registered User
    Join Date
    01-17-2020
    Location
    Boston
    MS-Off Ver
    2010 - 2019
    Posts
    1

    Get Table sort and filter properties (VBA)

    Hello!

    I am working on a vba script that will evaluate how a table's columns are currently filtered and sorted, [run some code which requires the sorting and filtering to be cleared], and then return the table to how it was previously sorted and/or filtered.

    I know how to sort and filter a table to a desired state using VBA but i dont know how to read and store the current settings from a table to be re-applied at a later point in the code.

    Thank you in advance!

  2. #2
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,176

    Re: Get Table sort and filter properties (VBA)

    the filter / sort is on the form:

    me.filter= "[state]='" & cboState & "'"
    me.filterOn = true

    msgbox me.filteron

    and the table property:

    dim tdf as tabledef
    set tdf = currentdb.tabledefs("tMyTAble")

    msgbox tdf.filter

+ 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. Format as table, no drop down list to sort and filter
    By Cheesecube in forum Excel General
    Replies: 1
    Last Post: 06-06-2019, 06:56 AM
  2. Automatically Sort a Pivot Table After Filter
    By charlesfarrell in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 11-19-2018, 01:04 AM
  3. [SOLVED] Table Sort and Filter
    By kent97 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-05-2016, 08:36 AM
  4. Filter / Sort table in non active workbook
    By BuZZarD73 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-20-2015, 10:51 AM
  5. Cannot filter or sort in a pivot table
    By moty.98 in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 07-23-2013, 09:35 AM
  6. Pivot table or filter to sort data?
    By merryquant in forum Excel Charting & Pivots
    Replies: 11
    Last Post: 03-13-2013, 12:39 PM
  7. Table Sort/Filter
    By D Richardson in forum Excel General
    Replies: 1
    Last Post: 01-12-2006, 10:40 AM

Tags for this Thread

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