+ Reply to Thread
Results 1 to 3 of 3

Opening Built-In Custom AutoFilter Dialog Box Programmatically

  1. #1

    Opening Built-In Custom AutoFilter Dialog Box Programmatically

    Hello,

    I would like to know if it possible to open the built-In Custom
    AutoFilter dialog box programmatically.

    Manually I get it through selecting a filtered field, followed by
    choosing "Custom..." in the pull down list. The automatic solution is
    not in the help files as far as I know.

    By the way,

    Application.Dialogs(xlDialogFilter).Show

    and

    Application.Dialogs(xlDialogFilterAdvanced).Show

    are not the one I exactly need. Is there a workaround?

    Thanks in advance,

    Nico Sterk


  2. #2
    K Dales
    Guest

    RE: Opening Built-In Custom AutoFilter Dialog Box Programmatically

    The menu you see when you select an autofiltered column is not one of the
    Excel Dialogs, as you note. I don't know how to activate that menu
    programatically, but you can set the autofilter criteria automatically
    through the Range.AutoFilter method - see help for details. If you want to
    make this interactive you may need to build your own custom dialog (userform)
    for the user to enter the criteria.
    --
    - K Dales


    "[email protected]" wrote:

    > Hello,
    >
    > I would like to know if it possible to open the built-In Custom
    > AutoFilter dialog box programmatically.
    >
    > Manually I get it through selecting a filtered field, followed by
    > choosing "Custom..." in the pull down list. The automatic solution is
    > not in the help files as far as I know.
    >
    > By the way,
    >
    > Application.Dialogs(xlDialogFilter).Show
    >
    > and
    >
    > Application.Dialogs(xlDialogFilterAdvanced).Show
    >
    > are not the one I exactly need. Is there a workaround?
    >
    > Thanks in advance,
    >
    > Nico Sterk
    >
    >


  3. #3
    Registered User
    Join Date
    05-23-2006
    Posts
    1
    Try this

    Application.ExecuteExcel4Macro "FILTER?(1)"

    where 1 is the number of column

    or for a predefined value:

    Application.ExecuteExcel4Macro "FILTER?(1, ""sometext"")"

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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