Link to home
Start Free TrialLog in
Avatar of bedsingar
bedsingarFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Excel 2010 Control IDs

Hello,

Does anybody know where I would find an up to date list of the excel 2010 control ID's?

I had an add in for excel 2003 that essentially listed the control id's under each tool bar, also highlighting the parent of that bar. - This made it pretty simple to find the controls I needed to disable.

I have a need to disable the following controls in Excel 2010 using VBA:

- temporarily remove all ribbons aside from file
- disable all save as methods
- disable the save buttons
- disable the save shortcuts
-disable everything in the file menu other than help, new & print


Thanks in advance
Avatar of dlmille
dlmille
Flag of United States of America image

You can go here: http://www.microsoft.com/en-us/download/details.aspx?id=6627 to download the Office 2010 control id's, which will have a file for Excel.

Unfortunately, you cannot do what you're looking to do via control id manipulation. You have to use Ribbon XML on your workbook to manage that.  

You'll need to reference Ron deBruin's site to better understand the backstage:http://www.rondebruin.nl/backstage.htm

Let me look to see if I can find an example that does what you want.

Dave
Here's one example:

https://www.experts-exchange.com/questions/27671632/Excel-2010-amend-file-Tab-ribbon.html

In the solution, I document how to hide all but the menu items you want to show in the FILE tab.

For more on hiding other ribbon tabs:http://www.rondebruin.nl/ribbon.htm

Again, let me know if you need more assistance.  I can work up an example workbook in a few hours, if needed.

Dave
ASKER CERTIFIED SOLUTION
Avatar of dlmille
dlmille
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bedsingar

ASKER

Hi Dave,

Thanks for your very thorough reply - really insightful! - Looks like what I need to do, but there is one further complication that I forgot to mention.

I need to keep the workbook in .xls format for the time being as our systems are predominently office 2003. The reason for undertaking this project is that a pilot of office 2010 is being rolled out that will affect a subset of users & there isn't a way of us telling which system they will be using!

Am I able to integrate this code into office 2003 VBA / will it be ignored?
- If so I assuem that I can then use a line of code placed at the top of the existing code that says if version = 14 then exit sub. (As your XML code above would have worked instead)

Looks like I've got some testing to do.

Thanks

Josh
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ok, sounds a bit more complicated then .

Basically the files are produced from a template & populated by VBA - which is using MS Access as a datasource & then publishing the templates to Sharepoint.

Of these files there will be around 160 versions - each containing different data and to be used by multiple contacts (Who may be either on the pilot or not), in some cases a template may be started by somebody on the pilot & finished by somebody on 2003.

Then when they have finished they submit this back to the sharepoint site (Which uses a workflow to create a "recently updated" list). Access then uses this list to action a collation of the data - which has to be in excel 2003 format as the comupter which does that collation is not on the pilot (And so only has office 2003) .....

The sum of this being = logistical nightmare! ... & I may end up opting to leave the menu items enabled until all the users have migrated over to 2010.

If on the otherhand I created the files as .xlsm files - every user who is not on the pilot would be hit with a compatability mode message when they open the file & I'm fairly confident other functionality would begin to fail :/ catch 22.
>> every user who is not on the pilot would be hit with a compatability mode message

Actually Office 2003 would not even recognize the format, I don't believe.

Is there anything else I can assist with?

Dave
Thanks for the help on this one, I've ended up going down the route of an Access API as it seems we cant do what we want cross platform. I would have used the XML solution if we had done a full migration to 2010 though.