Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable Ribbon command while WB is excel 2003 format
In the forums, I'm Ron de Bruin's instructions on changing the Ribbon
in Excel 2007. I haven't tried any of this yet, but it appears that the WB needs to be in Excel 2007 format. But because some of the uses of my WB are still on Excel 2003, I need the WB in that format. So, How do I disable, say the 'Cut' control/or command in the Clipboard Group when the WB is in Excel2003? Thanks, John |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable Ribbon command while WB is excel 2003 format
JohnEd explained :
In the forums, I'm Ron de Bruin's instructions on changing the Ribbon in Excel 2007. I haven't tried any of this yet, but it appears that the WB needs to be in Excel 2007 format. But because some of the uses of my WB are still on Excel 2003, I need the WB in that format. So, How do I disable, say the 'Cut' control/or command in the Clipboard Group when the WB is in Excel2003? Thanks, John AFAIK, you need to have two versions of your workbook. One for pre-2007 and one with the xml component for 2007 and later. Otherwise, a COMAddin can be configured to allow use of any version workbook and still set up your ribbon customizations. Similarly, you could just include code to open a dummy 2007.xlsm or 2007.xlsa that sets the ribbon up while your 2003.xls is open. You can include version-aware code in your 2003.xls to open the 2007 file if the Excel version is =12. This will allow your early version file to work in all versions as desired, without having to maintain two separate versions. Example: (2003.xls) In your Workbook_Open event or Auto_Open procedure If Application.Version = 12 Then Workbooks(ThisWorkbook.Path &"\ribbon.xlsa").Open End If In your Workbook_Close event or Auto_Close procedu On Error Resume Next Workbooks("ribbon.xlsa").Close False Note that the only purpose the 2007 file serves is to set up the ribbon how you want it. This will require using the CustomUI editor as outlined in Ron's documentation. Also, Bob Philips has an excellent alternative solution he http://msmvps.com/blogs/xldynamic/ar...me-simple.aspx HTH -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how can I disable a control in the ribbon at run time | Excel Programming | |||
Hide ribbon+command bars in 2003/2007 for specific file | Excel Programming | |||
Disable items on ribbon using VBA | Excel Programming | |||
Excel 2003 format menu disable | Setting up and Configuration of Excel | |||
Disable format painter in excel 2003 | New Users to Excel |