Remove Right-click Menu Custom Item
Hello,
I was reading a post in the Word Help forum: http://www.vbaexpress.com/forum/showthread.php?t=344
And I have a issue with some similarities in Excel. I've successfully added two custom items to my right click menu. I've used the following code with two of my macros:
Code:
Sub CreateRightClick1()
With Application.CommandBars("Cell").Controls.Add
.Caption = "Paste Values"
.OnAction = "pasteValues"
.Caption = "Paste Formats"
.OnAction = "pasteFormats"
End With
End Sub
My problem lies in the fact that I accidently ran this code twice and have now duplicated each control. :wot I'm having trouble finding the correct syntax/method of removing them. Can anybody point me in the right direction here? I've seen oodles of code to add to, but taking off a custom control? Any help would be greatly appreciated, this one's exhausting me :confused: