Consulting

Results 1 to 5 of 5

Thread: How to monitor the built-in ribbon buttons

  1. #1
    VBAX Mentor
    Joined
    Dec 2008
    Posts
    404
    Location

    How to monitor the built-in ribbon buttons

    Hi Exceloholics.

    I would like to monitor the clicks of some of the built-in ribbon buttons, e.g. all buttons responsible for sorting. So I would need something that will give me the ID of the clicked built-in button.
    Is there a possibility?

    Artik

  2. #2
    MS Excel MVP VBAX Mentor Andy Pope's Avatar
    Joined
    May 2004
    Location
    Essex, England
    Posts
    344
    Location
    Use can use the Command option for specified idMso.
    cancelDefault = False mean the builtin function will still be performed.

    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" >
    <commands >
    <command
    idMso="SortAscendingExcel"
    onAction="SortAscend_onAction"/>
    </commands >
    </customUI >
    module code
    Sub SortAscend_onAction(control As IRibbonControl, ByRef cancelDefault)
        MsgBox "Sort Ascend"
        cancelDefault = False
    End Sub
    Cheers
    Andy

  3. #3
    VBAX Mentor
    Joined
    Dec 2008
    Posts
    404
    Location
    Thanks Andy. It's not bad. Monitors ribbon controls and pop-up menus.
    But how to get to the sorting controls in the AutoFilter drop-down menu? I counted on finding IDs (idMso) for these controls, but I did not succeed.

    Artik

  4. #4
    MS Excel MVP VBAX Mentor Andy Pope's Avatar
    Joined
    May 2004
    Location
    Essex, England
    Posts
    344
    Location
    It does not appear to be a control you can access via ribbon xml.
    Cheers
    Andy

  5. #5
    VBAX Mentor
    Joined
    Dec 2008
    Posts
    404
    Location
    It looks like we can not interfere with this list.
    This thread dispels my hopes: https://social.msdn.microsoft.com/Fo...007?forum=vsto

    Admittedly, my problem is not completely resolved, but I think it's time to end this topic.

    Andy, thank you again.

    Artik

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •