Excel 2010 VBA button on ribbon

Hi

Is it possible in Excel VBA 2010 to create a button on one of the existing Excel ribbons?

Thanks
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAsked:
Who is Participating?
 
ProfessorJimJamCommented:
i am not sure what is the specific need, but you can customize the ribbon in Excel using a combination of XML and VBA. or you can add one of the built in existing commands into Excel ribbon which is explained here http://www.excel-easy.com/basics/ribbon.html

so which one are you looking for?
0
 
gowflowCommented:

Is it possible in Excel VBA 2010 to create a button on one of the existing Excel ribbons?

The answer is YES.
what do you need to be created and where.

gowflow
0
 
Martin LissOlder than dirtCommented:
Here's an example courtesy of Ron de Bruin which uses this XML.

<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
  <ribbon>
    <tabs>

      <tab idMso="TabHome" >
        <group id="customGroup1" label="My Group" insertAfterMso="GroupEditingExcel">

          <button id="customButton1" label="Click Me" size="large" 
		onAction="Macro1" imageMso="HappyFace" />

        </group>
      </tab>

    </tabs>
  </ribbon>
</customUI>

Open in new window

The new button is at the end of the 'Home' group.
Q-28668602.xlsm
0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Thanks
0
 
Martin LissOlder than dirtCommented:
You're welcome and I'm glad I was able to help.

In my profile you'll find links to some articles I've written that may interest you.
Marty - MVP 2009 to 2015
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.