PC Review


Reply
Thread Tools Rate Thread

Disable Ribbon command while WB is excel 2003 format

 
 
JohnEd
Guest
Posts: n/a
 
      12th Jun 2010
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
 
Reply With Quote
 
 
 
 
GS
Guest
Posts: n/a
 
      12th Jun 2010
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 procedure:

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 here:

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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hide ribbon+command bars in 2003/2007 for specific file dgold82 Microsoft Excel Programming 3 26th Apr 2009 05:38 PM
Excel 2003 format menu disable it Microsoft Excel Setup 1 29th Oct 2007 02:15 PM
Disable File Open Command On Excel Viewer 2003 Milzy Microsoft Excel Discussion 1 21st Apr 2005 02:52 PM
Disable format painter in excel 2003 =?Utf-8?B?dGVuY2hzYW1h?= Microsoft Excel New Users 1 8th Feb 2005 12:53 AM
How can I disable format painter in excel 2003? =?Utf-8?B?dGVuY2hzYW1h?= Microsoft Access Getting Started 1 7th Feb 2005 09:14 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:13 PM.