ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   CommandBars & Custom (https://www.excelbanter.com/excel-programming/389499-commandbars-custom.html)

John JBM

CommandBars & Custom
 
I'm trying to change the FaceID of a custom button on a custom mene. I can
access the buttons on built in commandbars but not the custom menu as shown
below:

This works: ?application.Commandbars("Format").Controls.Item(1 ).Caption

This Doesnt ?application.Commandbars("Custom
Menu").Controls.Item(1).Caption

Any ideas?

--
John

Gary Brown

CommandBars & Custom
 
Check spelling and spacing of your custom commandbar.
Remember that the commandbar name may be different than what you're seeing
on the screen. I have a commandbar called 'Amigo'.
I just tried both...

?application.Commandbars("Amigo").Controls.Item(1) .Caption
and
?application.Commandbars("amigo").Controls.Item(1) .Caption

They worked perfectly.

--
HTH,
Gary Brown

If this post was helpful to you, please select ''YES'' at the bottom of the
post.



"John JBM" wrote:

I'm trying to change the FaceID of a custom button on a custom mene. I can
access the buttons on built in commandbars but not the custom menu as shown
below:

This works: ?application.Commandbars("Format").Controls.Item(1 ).Caption

This Doesnt ?application.Commandbars("Custom
Menu").Controls.Item(1).Caption

Any ideas?

--
John



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

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