Solved

Modify a Excel 2010 ribbon for all users

Posted on 2010-11-08
6
474 Views
Last Modified: 2012-05-10
I am trying to find out if there is a way to modify a Excel 2010 ribbon for all users on one computer without having to do a export/import. From everything I am reading there isn't but I thought I would check with the experts to see if anyone may have found a way.
0
Comment
Question by:Aludaan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 14

Assisted Solution

by:leoahmad
leoahmad earned 100 total points
ID: 34089664
0
 

Author Comment

by:Aludaan
ID: 34108590
Hey Leoahmad. I was actually looking to be able to set it up on a PC and have a icon show up for everyone using the PC, not just the file. But right now that would be fine but I could never get it to fully work. I included a copy of the script I added but I keep getting a "Wrong number of arguments or invalid property assignment" error or a macro doesn't exist error. Everything I have read online says that this script is correct, and it is such a basic setup I don't see what is wrong with it. If you have any idea I will accept assistance otherwise I may just have to close this and manually configure excel for only select users and force them to have to be the ones to run it all the time.

Thanks.
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
	<ribbon>
		<tabs>
			<tab idMso="TabHome">
				<group id="MyGroup" label="My Group">
					<button id="Button1" label="My Large Button" size="large" onAction="ThisDocument.dcdsrHTML" />
				</group>
			</tab>
		</tabs>
	</ribbon>
</customUI>

Open in new window

0
 
LVL 4

Accepted Solution

by:
theGove earned 400 total points
ID: 34271173
A quick look at your ribbon modification makes me think that the problem deals with the onAction.

The value of onAction needs to be a vba subprocedure that is configured to receive the a reference to the ribbon control that is used to invoke it.  Accordingly, for your ribbon modification to work you would need to have a vba subprocedure defined as follows:
Sub ThisDocument.dcdsrHTML(control As IRibbonControl)
  'code to do whatever is needed
End Sub

Open in new window


The problem is that the procedure name "ThisDocument.dcdsrHTML" is not allowed in VBA.  Procedures names must start with a letter and are limited to letters, numbers and the underscore character.

if I modify your custom ribbon xml to replace" ThisDocument.dcdsrHTML" with "dcdsrHTML" so it shows as follows:
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
	<ribbon>
		<tabs>
			<tab idMso="TabHome">
				<group id="MyGroup" label="My Group">
					<button id="Button1" label="My Large Button" size="large" onAction="ThisDocument.dcdsrHTML" />
				</group>
			</tab>
		</tabs>
	</ribbon>
</customUI>

Open in new window


and add a vba suprocedure in a general module that looks like this:
Sub dcdsrHTML(control As IRibbonControl)
  MsgBox "hi"
End Sub

Open in new window


You ribbon modification works fine for me.
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
LVL 4

Expert Comment

by:theGove
ID: 34271229
Now, about getting the ribbon modification to stick around for all users.  I think this can be accomplished quite easily.  Once you have workbook that has the ribbon modification you want, save that workbook as an excel addin.  Just choose File|Save As... and under the "save as type" drop down, select "Excel Add-In."  This will allow you to save the file as an an addin (.xlam) file.  Then you can install this addin into this copy of excel by choosing "File|Options..." This will bring up the "excel options" dialog box.  On the left, select "add in" and then at the bottom of the right pane where it says "manage", choose "Excel Add-ins" and click "GO"  If you saved the addin in the default location, you should see it in the list to of addins--you can just click it and say "OK."  If it is not already showing, click the "Browse" button an locate the file you saved as an .xlam file.

I think this will make the ribbon modifications permanent for all users.
0
 

Author Comment

by:Aludaan
ID: 34315367
Thanks theGove. I will give that a shot.
0
 

Author Closing Comment

by:Aludaan
ID: 34337140
Thanks theGove. That worked.
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question