Consulting

Results 1 to 5 of 5

Thread: Ribbon tool

  1. #1
    VBAX Newbie
    Joined
    Feb 2017
    Posts
    2
    Location

    Ribbon tool

    Hello all,

    do you know how to add a Ribbon tab like the ones that apper when selecting a Chart or a pivot. I don't know how is it called a tab like this...

    I need to create such tab in my addin when user select a certain worksheet.

    I already know ho to create a new Ribbon using Custom UI Editor.


    Thanks

    Cattura.jpg

  2. #2
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,726
    Location
    That's a "Context Menu" but I don't think you can add your own; I think you have to modify built in ones


    Ron de Bruin has a nice write up with examples


    http://www.rondebruin.nl/win/s2/win003.htm

    and

    http://www.rondebruin.nl/win/s2/win014.htm


    Capture.JPG

    1. These is one called "ContextMenuWorkbookPly" which is the one that right-clicking on the worksheet tab name will bring up. You could add to that one, or

    2. Just create your own 'normal' ribbon tab and make it visible or not depending on if your special worksheet is active

    Personally, I'd go with #2 since it's more 'standard'
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  3. #3
    VBAX Master Aflatoon's Avatar
    Joined
    Sep 2009
    Location
    UK
    Posts
    1,720
    Location
    To be pedantic, it's a contextual tab, rather than a context menu (which are the right-click menus only): http://www.rondebruin.nl/win/s2/win006.htm
    Be as you wish to seem

  4. #4
    VBAX Newbie
    Joined
    Feb 2017
    Posts
    2
    Location
    Ok, by knowing the name I found all that i need, and it seems is not possible to create a contextual tabe that is shown when a particular sheet is open. The contextual menu are preset on object like chart, pivot, table, ....
    So maybe the best and only solution is the one suggested by Paul: "Just create your own 'normal' ribbon tab and make it visible or not depending on if your special worksheet is active"

    Thanks fro your help

  5. #5
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,726
    Location
    Quote Originally Posted by Aflatoon View Post
    To be pedantic, it's a contextual tab, rather than a context menu (which are the right-click menus only): http://www.rondebruin.nl/win/s2/win006.htm
    Thanks for the correction

    You are correct of course, and I was having a "senior moment"
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

Tags for this Thread

Posting Permissions

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