D
Devin McMahon
I have a a Custom Menu, with items whose caption comes from the values
in an ado recordset. When I build the menu, I check the registry to
see if the caption on the menu matches a value in a specific key, and
if so that button goes to msoButtonDown
When the user selects a different item, I use ActionControl.Caption to
pass that variable to function and change the value of the registry
key
I then toggle the new choice as msoButtonDown
So far, so good except that the old choice remains msoButtonDown
I looked into Object, and CommandBarControl.FindControl, etc, to
toggle all menu items as msoButtonUp before setting the new value but
all of those examples seem to indicate that you need to know the name
of the control, and since my menu is populated dynamically, I don't
know the name at runtime, or do I?
Will I have to remove and rebuild all the items on the menu, and if so
is there an example I can refer to? Or, am i missing something on
iterating through the buttons?
Thanks
in an ado recordset. When I build the menu, I check the registry to
see if the caption on the menu matches a value in a specific key, and
if so that button goes to msoButtonDown
When the user selects a different item, I use ActionControl.Caption to
pass that variable to function and change the value of the registry
key
I then toggle the new choice as msoButtonDown
So far, so good except that the old choice remains msoButtonDown
I looked into Object, and CommandBarControl.FindControl, etc, to
toggle all menu items as msoButtonUp before setting the new value but
all of those examples seem to indicate that you need to know the name
of the control, and since my menu is populated dynamically, I don't
know the name at runtime, or do I?
Will I have to remove and rebuild all the items on the menu, and if so
is there an example I can refer to? Or, am i missing something on
iterating through the buttons?
Thanks