![]() |
Getting the Label or Caption of MenuItem Selected
I've created a custom menu on the command bar with a handfull of menu items
and some sub-menu items. I have assigned an on-action event to each of these but would like to be able to get the caption property for the menu item or sub-menu item selected. Is there a way to get this information other than by the fact that the event goes to the assigned on-action routine? Thanks, B |
Getting the Label or Caption of MenuItem Selected
Brian,
As soon as a commandbar is selected/clicked the OnAction macro is invoked. So why would you not get the caption at that point. You can get the caption with Application.CommandBars.ActionControl.Caption -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Brian Stigler" wrote in message ... I've created a custom menu on the command bar with a handfull of menu items and some sub-menu items. I have assigned an on-action event to each of these but would like to be able to get the caption property for the menu item or sub-menu item selected. Is there a way to get this information other than by the fact that the event goes to the assigned on-action routine? Thanks, B |
All times are GMT +1. The time now is 02:37 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com