Custom context menu with sub-menus

Formula11

Active Member
Joined
Mar 1, 2005
Messages
468
Office Version
  1. 365
Platform
  1. Windows
Is it possible to have a 3rd level of context menu, using traditional VBA coding?

Similar to this example which uses RibbonX.
Customizing Context Menus in Win Microsoft Excel 2010 and higher and also Mac Excel 2016 and higher

1667569733683.png
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
There is, but off the top of my head, it wouldn't look exactly like you have it in the screen capture. It would have to use the smaller "version" like you see in the 1st and 2nd levels (eg, using a smaller ImageMSO, a bitmap, or like the FaceIDs in a previous question I worked with you on). I'm on my phone at the moment, so can't give example code until later tonight, but you'd want to use the CommandBars object.

You could recreate the context menu like you see in your image above. But there would need to be a little bit of XML ribbon work - basically you can create a dynamic menu, and use VBA to write the code, but you will need to at least amend the ribbon XML code in the workbook in order to do that.
 
Upvote 0
Thanks Dan_W, this is suitable I think.
It looks like a popup menu can be made after the context menu, so this will be able to go to the 3rd level.
Thanks for solving.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,173
Members
453,021
Latest member
Justyna P

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