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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ProfessorJimJamMicrosoft Excel ExpertCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.