Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 220
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 205
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 220
Default 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.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 205
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How Do I Trap #VALUE! Robert P. Stearns Excel Programming 2 February 18th 04 10:01 PM
focus on commandbarPopup vivek Excel Programming 0 January 12th 04 07:02 PM
OnAction Jim Rech Excel Programming 1 September 5th 03 04:39 PM
OnAction Richard Yang Excel Programming 1 July 15th 03 01:37 PM


All times are GMT +1. The time now is 06:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"