Toggle macro button

K

Klaus Linke

Hi Tony,
Set myButtonTemplate = Templates(myCBB.Parent.Context)

Aah, bingo! Thank you, I knew my code was overly complicated!

Though it probably had a logical error, too: Say an attached template or
global template has added a button to some built-in toolbar, then the Parent
would be Normal.dot, not that template. And I would want keep the template's
..Saved flag clean, not Normal.dots.
Sub ToggleState(myControl As CommandBarControl, myState As String)

Strange, that is exactly what I tried yesterday. Not sure what I did wrong,
but glad it does work as expected.

Thanks!
Klaus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top