[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1100
  • Last Modified:

Mirosoft Excel Menu Animations

Mircosoft Excel VBA Editor.
I have added a menu called "Build Tools" to the default Excel Command Bar using the VB Editor.  On the
drop down there are four options that will each run a separate macro.  What I require is code or method
to provide an animation in the space provided - something similar to the Copy and Paste items.
0
jguerin2
Asked:
jguerin2
  • 2
1 Solution
 
RiCHQRDCommented:
could you record a macro doing the copy paste actions then analyse the VB code and see how its been done?
0
 
byundtCommented:
Ivan Moala explains how to do animations using a successive series of images in this web page (and its follow-on links): http://xcelfiles.homestead.com/Excel04.html

Note: the demonstration & code on the follow-on page renders poorly in Firefox. It looks much better in Internet Explorer.
0
 
jguerin2Author Commented:
Thanks for the answers but none of these suffice - i just need simple code to add an animation to the drop down menu.  So when I click on my Build Tools menu my drop down should resemble the drop down when clicking for example file - static "JPEG" next to Open,New,Save etc - I hope I am making this a bit clearer - thanks for help so far
0
 
byundtCommented:
If you want an icon next to the menu item, then by far the easiest approach is to use one of the built-in icons furnished with Office. You do this with the FaceID property of the command bar control. John Walkenbach provides a means of seeing all the possibilities in http://j-walk.com/ss/excel/tips/tip67.htm 

Assuming that you know the desired FaceID, you would assign it to your control with:
Application.CommandBars("Build Tools").Controls("Do stuff").FaceID = 52     'Assign "piggy bank" icon to this control
Application.CommandBars("Build Tools").Controls("Do stuff").Style = msoButtonIconAndCaption     'Display both text and icon


Brad
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now