You can't. You must write special XML code (known as RibbonX code) and insert the XML document into a workbook file by using third-party tools. Or, if you're a glutton for punishment (and know what you're doing), you can do it by unzipping the document and making the edits manually.
In Excel 2007, you have these choices:
Modify the Ribbon (not an easy task).
Add your macro to the Quick Access Toolbar (a manual task that's not possible to perform using VBA).
Assign a shortcut key to the macro.
Add a new menu item to a shortcut menu.
Create an old-style toolbar or menu, which will display in the Add-Ins tab.
Right-click the QAT and choose Customize Quick Access Toolbar from the shortcut menu. In the Customize tab of the Excel Options dialog box, choose Macros from the drop-down list on the left. Select your macro and click Add. To change the icon or text displayed, click the Modify button.
In order to execute a macro from the QAT, the workbook that contains the macro must be the active workbook. This is not the case, however, if the macro is in an add-in or stored in your Personal Macro Workbook.
SendKeys is your only choice. Press the Alt key to find out the keystroke(s) required. For example, to switch to the Page Layout tab, use this:
Application.SendKeys "%p{F6}"
The following procedure will do the job:
Sub DisableAllShortcutMenus() Dim cb As CommandBar For Each cb In CommandBars If cb.Type = msoBarTypePopup Then _ cb.Enabled = False Next cb End Sub