![]() |
How to trap the OnAction of a CommandBarPopup
Whenever i have wanted to trap the click or action event of a popup
menuitem, I have just set the .OnAction property to a particular sub name. However, I am trying to wrap some of this code in a class, and I am having trouble. The OnAction parameter can't refer to a class's procedure (as far as i know), and there are no events that the CommandBarPopup sources... so how can I accomplish this? Any help would be most appreciated. |
How to trap the OnAction of a CommandBarPopup
Hi R,
However, I am trying to wrap some of this code in a class, and I am having trouble. The OnAction parameter can't refer to a class's procedure (as far as i know), and there are no events that the CommandBarPopup sources... so how can I accomplish this? Any help would be most appreciated. Only the CommandBarButton and CommandBarComboBox source events, so you need to use those objects in your class modules (usually the CommandBarButton) Regards Stephen Bullen Microsoft MVP - Excel www.oaltd.co.uk |
How to trap the OnAction of a CommandBarPopup
Ok. The purpose of doing this is so that the sub menuitems populate at
run-time, when the user wants to see the contents of the menu. It is possible to do this using the OnAction property as long as the all the code is contained in a regular module. Instead, i thought it might be cleaner to have some sort of event that i can trap. But if this is not possible, then there is no point. I thought there might have been a way around that, but i guess not. Thanks. |
How to trap the OnAction of a CommandBarPopup
Hi,
The purpose of doing this is so that the sub menuitems populate at run-time, when the user wants to see the contents of the menu. I hear you, but I'm afraid the CommandBarPopup control doesn't source events. I've sent the request for a BeforePopup event to Microsoft a few times, but to no avail (yet). Regards Stephen Bullen Microsoft MVP - Excel www.oaltd.co.uk |
All times are GMT +1. The time now is 11:10 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com