Is it possible to show custom pop-up menus in the
Worksheet_BeforeRightClick() function? I am
currently setting the "Cancel" parameter equal to
False and display a Userform, which is fine, but I'd
rather display a custom pop-up menu here.
I'd appreciate any hints. Thank you!
1st, you need to create the popup 'toolbar'.
2nd, you need to determine the criteria that specifies the context
under which this menu appears instead of the default menu. (IOW, make
its display conditional)
The code to display the popup is...
If <codition> = True Then
Cancel = True
CommandBars("MyPopup").ShowPopup
End If
Alternatively, you can add your menus to the default popup
and
toggle their visibility in context. In this case you'll need to 'flag'
your menus by placing an ID in either the Tag or Parameter property so
your code knows which menus are yours. You can also use the Caption to
ID your menus so long as this doesn't conflict with another menu's
Caption in the same popup.
Remember to remove your customs menus and delete your toolbar before
shutdown so you don't polute Excel's tlb.
--
Garry
Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion