ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Custom pop-up menus? (https://www.excelbanter.com/excel-programming/448664-custom-pop-up-menus.html)

Robert Crandal[_2_]

Custom pop-up menus?
 
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!



GS[_2_]

Custom pop-up menus?
 
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[s] 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



Robert Crandal[_2_]

Custom pop-up menus?
 
Never mind. I find a solution! 8)

"Robert Crandal" wrote
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!




All times are GMT +1. The time now is 03:11 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com