ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   RibbonX Controls and Determining Enabled? (https://www.excelbanter.com/excel-programming/438795-ribbonx-controls-determining-enabled.html)

TMC[_2_]

RibbonX Controls and Determining Enabled?
 
Hey All,

I am aware of the 'Enabled' attributed and associated 'getEnabled' callback.

However, what if I just want to determine if a control in enabled? For
example, I do not want to set its state in XML and I do not want to change
its 'Enabled' property via the callback but, rather, I just want to find out
if it is enabled or not.

With the old CommandBarButtons, one could call the 'Enabled' property to
determine this.

Is there some way to determine if a Ribbon control is enabled?

Thanks


Andy Pope

RibbonX Controls and Determining Enabled?
 
Hi,

For a built-in control you can use GetEnabledMso.
Example for paste button.

application.CommandBars.GetEnabledMso("Paste")

Cheers
Andy

--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"TMC" wrote in message
...
Hey All,

I am aware of the 'Enabled' attributed and associated 'getEnabled'
callback.

However, what if I just want to determine if a control in enabled? For
example, I do not want to set its state in XML and I do not want to change
its 'Enabled' property via the callback but, rather, I just want to find
out if it is enabled or not.

With the old CommandBarButtons, one could call the 'Enabled' property to
determine this.

Is there some way to determine if a Ribbon control is enabled?

Thanks



Bob Phillips[_4_]

RibbonX Controls and Determining Enabled?
 
I am not aware of any way that you can address a control on the ribbon other
than via a callback, when the control is passed to the callback procedure.

HTH
Bob

"TMC" wrote in message
...
Hey All,

I am aware of the 'Enabled' attributed and associated 'getEnabled'
callback.

However, what if I just want to determine if a control in enabled? For
example, I do not want to set its state in XML and I do not want to change
its 'Enabled' property via the callback but, rather, I just want to find
out if it is enabled or not.

With the old CommandBarButtons, one could call the 'Enabled' property to
determine this.

Is there some way to determine if a Ribbon control is enabled?

Thanks




TMC[_2_]

RibbonX Controls and Determining Enabled?
 
Thanks Andy!

Exactly what I was seeking ;-)



"Andy Pope" wrote in message
...
Hi,

For a built-in control you can use GetEnabledMso.
Example for paste button.

application.CommandBars.GetEnabledMso("Paste")

Cheers
Andy

--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"TMC" wrote in message
...
Hey All,

I am aware of the 'Enabled' attributed and associated 'getEnabled'
callback.

However, what if I just want to determine if a control in enabled? For
example, I do not want to set its state in XML and I do not want to
change its 'Enabled' property via the callback but, rather, I just want
to find out if it is enabled or not.

With the old CommandBarButtons, one could call the 'Enabled' property to
determine this.

Is there some way to determine if a Ribbon control is enabled?

Thanks





All times are GMT +1. The time now is 02:11 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com