Context Menu Help!!

A

Al

Hi there

A while back, someone sent me the useful code below. It adds macros to the
Right-Click menu in excel and is great. However, I can't figure out how to
remove items from the menu once they've been added. Could anyone help with
this ?? My Right-Click menu is getting scarily big.... thanks!!

Sub AddItemToContextMenu()
Dim cmdNew As CommandBarButton

Set cmdNew = CommandBars("cell").Controls.Add

With cmdNew
.Caption = "MACRO TITLE HERE"
.OnAction = "MACRO NAME HERE"
.BeginGroup = True
End With

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top