Hi
I have an add-in that creates a custom tab on the ribbon. A few of the buttons load other add-ins, I would like for these to be able to add buttons to my custom tab, however all attempts to do this result in either i) a new tab on the ribbon or ii) nothing. Any ideas?
Cheers
Mat
Last edited by mat.davies; 01-13-2012 at 05:30 AM. Reason: solved
Hi Mat.davies
welcome to the forum!
Do you mean the ribbon?
Andy has a good ribbon designer here
http://www.andypope.info/vba/ribboneditor.htm
What is the code?
regards pike
If the solution helped please donate here to the RSPCA
Sites worth visiting;
J&R Solutions - royUK
AJP Excel Information - Andy Pope
Spreadsheet Toolbox
VBA for smarties - snb
If you want to share a custom tab you need to use the Namespace and idQ referencing.
Hi Pike, thanks for the quick reply.
Yes, I was referring to the ribbon. The editor you sent looks interesting, but I dont have admin access to the PC to install it, and I'm not sure it can do what i'm after.
I've tried quite a bit of code, in the 1st workbook, customui.xml, i have
The macro 'dostuff' then loads a second file, it's the xml in this file that i'm not sure of. I've tried variations around the following<?xml version="1.0" encoding="utf-8" ?> <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"> <ribbon> <tabs> <tab id="myTab" label="Stuff" keytip="U"> <group id="group" label="group"> <button id="stuff1" label="dostuff" imageMso="FileCheckIn" size="large" onAction="dostuff" /> </group> </tab> </tabs> </ribbon> </customUI>
where the macro 'domorestuff' is in the second addin. This doesn't work. I have tried playing around with the <tab> and <group> tags, and tried calling the name as a tabMSO, which doesn't work.<?xml version="1.0" encoding="utf-8" ?> <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"> <ribbon> <tabs> <tab id="myTab"> <group id="group"> <button id="stuff2" label="domorestuff" imageMso="FileCheckIn" size="large" onAction="domorestuff" /> </group> </tab> </tabs> </ribbon> </customUI>
Thanks again,
Mat
Cheers andy, I've figured out what is needed, will post the correct code once I've got it working!
Mat
Working xml for customui.xml in both files...
<?xml version="1.0" encoding="utf-8" ?> <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" xmlns:nsMat="MatNamespace"> <ribbon> <tabs> <tab id="nsMat:myTab" label="Stuff" keytip="U"> <group id="group" label="group"> <button id="stuff1" label="dostuff" imageMso="FileCheckIn" size="large" onAction="dostuff" /> </group> </tab> </tabs> </ribbon> </customUI>Code shown adds a new group, but I imagine it's fairly straightforward to add buttons to an existing group, (although I haven't tried)<?xml version="1.0" encoding="utf-8" ?> <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" xmlns:nsMat="MatNamespace> <ribbon> <tabs id="nsMat:myTab" label="Stuff" keytip="U"> <tab id="myTab"> <group id="group2" label="group"> <button id="stuff2" label="domorestuff" imageMso="FileCheckIn" size="large" onAction="domorestuff" /> </group> </tab> </tabs> </ribbon> </customUI>
Thanks again to everyone who replied!
Mat
good stuff its not to hard once you get the hang of it
regards pike
If the solution helped please donate here to the RSPCA
Sites worth visiting;
J&R Solutions - royUK
AJP Excel Information - Andy Pope
Spreadsheet Toolbox
VBA for smarties - snb
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks