ShowPopup doen'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?