+ Reply to Thread
Results 1 to 2 of 2

Disabling Autofilter menu Sort Ascending/Descending commands

  1. #1
    Registered User
    Join Date
    08-03-2011
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2007
    Posts
    3

    Disabling Autofilter menu Sort Ascending/Descending commands

    Hello dear Excel Experts!

    I want to restrict access to the sort features in Excel to select users.

    I already implemented some RibbonX repurposing via CustomUI14.xml/CustomUI.xml like so:

    Please Login or Register  to view this content.
    Plus the following macro:

    Please Login or Register  to view this content.
    HOWEVER, I found that this doesn't disable the most important culprit for accidental sorting, the menu item when you click on the little AutoFilter selection boxes:

    \1

    Does anybody know how to repurpose/intercept these two? They don't seem to be handled via RibbonX...

    P.S. Yes, I know that I could also protect the sheet and just enable all features (or most features) apart from sorting but the constant protection/unprotection that would need to be performed is really clunky and impossible on shared workbooks.
    Last edited by Lim-Dul; 01-08-2013 at 10:44 AM. Reason: Found the answer to the problem myself.

  2. #2
    Registered User
    Join Date
    08-03-2011
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Disabling Autofilter menu Sort Ascending/Descending commands

    OK, I did several hours of additional research on this and finally found the answer to this problem, disappointing as it might be.

    Sorry, from my test, this objective should be unachievable. When we click that little drop-down menus of auto-filter column, what pops up to us is a Excel internal dialog, Microsoft.Office.Interop.Excel.XlBuiltInDialog.xlDialogFilter. It is not a CommandBar and not a Ribbon Command. We cannot control, and override any controls in Office built-in dialog.
    Re-quoted answer by Ji Zhou of Microsoft themselves from this thread on MSDN:
    http://social.msdn.microsoft.com/For...8-05b54850c464

    Ah well, that sucks big time but I hope it answers that for anybody else who might be wondering.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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