dynamic right click menu

amigos.pl

New Member
Joined
Jul 2, 2009
Messages
31
hi there

I need to be able to show right click menu and each button on that menu will run the same sub but with different parameter (similar to having shapes running the same sub but based on application.caller.name - inside the sub I can make it behave differently) - is that doable?

I can create a menu - I am having a problem with reading "which button was clicked"

Basically I have people having different items in their portfolio and I want to use right click to remove any item that they want to. So if in portfolio we have A, B and C, right click menu will show 3 lines "Remove A", "Remove B" and "Remove C" but they will all call sub "Remove". Than based on which button was clicked - code will remove A, B or C - hope that makes sense...

thanks in advance
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
You can use Commandbars.Actioncontrol or you can assign the argument in the OnAction property and then your code doesn't need to know which button was clicked.
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,841
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top