We help IT Professionals succeed at work.

VBA - How to retrieve current dropdown setting in custom MS Office Ribbon menu

156 Views
Last Modified: 2016-07-27
Working in Microsoft PowerPoint 2010, I have a custom ribbon menu (toolbar), and I'm using dropdown controls.  I want the user to be able to select a search keyword, which they narrows down the graphics that appear on a dropdown gallery in the button next to it.

Currently I have an onAction macro associated with the dropdown that changes a public variable each time the dropdown is changed.  then the gallery button filters based on that public variable.  How do I accomplish this without relying on a public variable?.  In other words, when the user hits the gallery button, I'd like it to read the current setting of the ribbon dropdown and create the filtered set at that time.  

Appreciate any pointers.
Comment
Watch Question

John WilsonCEO PowerPoint Alchemy
CERTIFIED EXPERT

Commented:
You need to post both the XML code and the vba callback.
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Commented:
Oh... if using MS Word... definitely use a document variable to store the ribbon pointer handle as per Rory solution if you're not already doing that (that by the way is not quite related to the original question but well worth the effort).
Bryce BassettFreelance VBA programmer

Author

Commented:
Thanks!  Seems similar to the public variable solution I am using, but I'll try your suggestion.

Commented:
Doc variable is non volatile, that'd be the main difference
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.