+ Reply to Thread
Results 1 to 3 of 3

Excel 2007 : Customizing the ribbon/menu items.

  1. #1
    Forum Contributor
    Join Date
    05-19-2004
    Location
    United States
    MS-Off Ver
    Office XP and Office 2003
    Posts
    127

    Question Customizing the ribbon/menu items.

    Our application is currently written using Office XP (Excel 2002). When our tool is run, we modify the menu items (add and remove some of them). For example, we remove some like the ones that allow users to Insert rows.

    We also have code to add our own menu items.

    In Excel 2007, is there a way using code to disable the menu items and to create our own?

    Also, in Excel 2007, is there a way using code to disable/hide some of the options on the ribbons? Also, can we add our own menu items along with ribbon commands? How can this be done using code?

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Customising the Ribbon is not as straightforward as writing VBA code to add or amend menus in earlier versions.

    See this

    http://www.rondebruin.nl/compatiblemenu.htm
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Contributor
    Join Date
    12-11-2004
    MS-Off Ver
    2007
    Posts
    137
    Hello,


    In Excel 2007, is there a way using code to disable/hide some of the options on the ribbons?
    You can use XML and VBA code to modify or create custom controls in the Ribbon.


    This XML code desactivate "CellFillColorPicker" button :
    enabled attribute to false, desactivate the button.

    Please Login or Register  to view this content.

    Commands parameters have to be placed at the begin of xml file, before the line :
    ribbon startFromScratch="boolean".
    This action desactivate the button in "TabHome" and mini toolbar (contextual bar).

    This is a simple example. there many other options : repurpose commands, conditionnals desactivations ....



    Also, can we add our own menu items along with ribbon commands? How can this be done using code?
    another reference to custom your ribbon :

    http://www.oaltd.co.uk/Spreads/Excel...ogRef_ch14.pdf



    Regards
    michel

+ 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