Custom context menu with sub-menus

Formula11

Active Member
Joined
Mar 1, 2005
Messages
438
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

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
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,214,935
Messages
6,122,337
Members
449,077
Latest member
Jocksteriom

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