I use macros to navigate within spreadsheets based on predefined named locations. I was able to assign these "GoTo" macros to buttons on the Ribbon. I am trying to assign the same macros to a ComboBox, but I can't figure out how to do it. Here's the button macro that works fine.
<button id="rxbtnGoTo_Historicals"
label="Hist"
imageMso="AppointmentColor2"
onAction="rxbtnGoTo_Historicals_Click"/>
Here's my attempt at assigning the same macro to a ComboBox. However, when I try to validate it, I get this error message: "onChange attribute is not declared".
<comboBox id = "NavigationDropDown"
label = "Navigation"
onChange = "rxcboNavigationDropDown_Click">
<item id = "rxitemcboGoTo_Historicals"
label = "Hist"
onChange = "rxitemGoTo_Historicals"/>
Can you please tell me what I'm doing wrong or provide some guidance?
Thanks
I would have thought you just use the onChange of the combo itself (the items don't have one AFAIK) and then in the callback check the text argument (i.e. the selected item) to determine what you should run.
So long, and thanks for all the fish.
What's "AFAIK"? Is having Items necessary?
BTW, Romperstomper is a good flick.
I think I figured it out.
AFAIK = As Far As I Know!![]()
So long, and thanks for all the fish.
Your post does not comply with Rule 9 of our Forum RULES. If you solve a problem yourself before anyone else has responded, please take a moment to describe your solution, chances are some other member will benefit. And please never edit a thread in which someone else has responded.
How to mark a thread Solved
Go to the first post
Click edit
Click Go Advanced
Just below the word Title you will see a dropdown with the word No prefix.
Change to Solved
Click Save
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel consulting, free examples and tutorials visit Excel Consulting-Excel VBA
Check out the free Excel Toolbar
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
Code Tags: Make your code easier for us to read
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks