Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
| Search | Today's Posts | Mark Forums Read
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old July 12th, 2003, 06:36 AM
Registered User
Join Date: Jul 2003
Location: , , India.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default ShowPopup doesn't fire events on menu bar

In the end, I created a standard button with the image on it
and it calls the ShowPopup() function for a popup menu that gets displayed
right under the button.

The solution isn't pretty, but seems to work nicely.

This is working fine and its showing popup at exact position, but I am not
able to trace the sub menus click events. I have declared that with
WithEvents but it doesn't fire the events. What is the cause? Please let me
know if you have successfully implemented the same.

My code is like this:

Dim WithEvents ButtonSave As CommandBarButton
Set CmdBarPopup = OutlookApplication.ActiveExplorer.CommandBars.Add _
    (Name:="Custom", position:=msoBarPopup, Temporary:=True)

Set ButtonSave = CmdBarPopup.Controls.Add(Type:=msoControlButton,
ButtonSave.Style = msoButtonIconAndCaption
ButtonSave.FaceId = 9
ButtonSave.Caption = "&Order Literature"
ButtonSave.Enabled = True

Now, ButtonSave_Click doesn't work. Do you know why? Please reply if you
have solution to this?


Sumit Kalra
Software Engineer
New Delhi

Similar Threads
Thread Thread Starter Forum Replies Last Post
Before Right Click showpopup menu davespearce Excel VBA 0 December 11th, 2007 08:03 PM
Fire Events from Nested GridView adamh409 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 2 November 5th, 2007 01:18 PM
How to fire events from datagrid cell? param99 ASP.NET 1.0 and 1.1 Professional 2 November 15th, 2006 07:33 AM
ShowPopup doen't fire events on menu bar sumit_kalra Access VBA 1 March 3rd, 2005 11:13 AM
How to trap Mouse events on Title bar/Caption bar chiefouko Pro VB.NET 2002/2003 0 September 21st, 2004 02:42 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.