|
|||||||||||||||||||||
|
#1
|
|||
|
|||
|
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
|
||||
|
||||
|
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 consulting, free examples and tutorials visit my site Check out the free Excel Toolbar New members please read & follow the Forum Rules Where to copy the code to Code Tags: Make your code easier for us to read |
|
#3
|
|||
|
|||
|
Hello,
Quote:
This XML code desactivate "CellFillColorPicker" button : enabled attribute to false, desactivate the button. Code:
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<commands>
<!-- desactivate "CellFillColorPicker button" -->
<command idMso="CellFillColorPicker" enabled="false" />
</commands>
<ribbon startFromScratch="false">
</ribbon>
</customUI>
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 .... Quote:
http://www.oaltd.co.uk/Spreads/Excel...ogRef_ch14.pdf Regards michel |
![]() |
| Bookmarks |
New topics in Excel 2007 Help
|
|
|
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|