|
|||||||||||||||||||||
|
#1
|
|||
|
|||
|
Ribbon commands in Excel 2007
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 have code like the following.
With CommandBars(1).FindControl(ID:=30006).CommandBar .FindControl(ID:=30026).Visible = False .FindControl(ID:=30024).CommandBar.FindControl(ID:=883).Visible = False .FindControl(ID:=30024).CommandBar.FindControl(ID:=884).Visible = False .FindControl(ID:=30025).CommandBar.FindControl(ID:=886).Visible = False .FindControl(ID:=30025).CommandBar.FindControl(ID:=887).Visible = False .FindControl(ID:=3058).Visible = False End With We also have code to add our own menu items like the following: Set menBidFile = menGGG.Controls.Add(Type:=msoControlPopup, ID:=1) menBidFile.Caption = "&Bid File" menBidFile.TooltipText = "Bid File" menBidFile.BeginGroup = True sMenuItemAdd menBidFile, "&New", "Create a new bid file", "ThisWorkbook.sBidNew", False, True And (Range("rngViewOnly") <> "Y"), True sMenuItemAdd menBidFile, "&Edit", "Edit an existing bid file", "ThisWorkbook.sBidEdit", False, True And (Range("rngViewOnly") <> "Y"), True sMenuItemAdd menBidFile, "&View", "View an existing bid file", "ThisWorkbook.sBidView", False, True, True sMenuItemAdd menBidFile, "&Save", "Save the current bid file", "ThisWorkbook.sBidSaveFromMenu", True, True, True sMenuItemAdd menBidFile, "Save Bid &As", "Save bid file using new name", "ThisWorkbook.sBidSaveAs", False, True, True sMenuItemAdd menBidFile, "&Close", "Close bid but keep GGG open", "Thisworkbook.sBidClose", True, False, True menBidFile.Enabled = True 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
|
||||
|
||||
|
Post locked for failing to use Code Tags.
LAF, you can re-post this using Code Tags and I will delete this one.
__________________
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 |
![]() |
| 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 | |
|
|