Add control to right click menu when something is on the clipboard

S

Sean

Hi,

I have managed to add an control to my right click menu. The problem is that
when have something on my clipboard a right click gives me a different menu.
Any tips on how to add an item to that menu would be appreciated.

I am using the following code to add an item to the regular right click
menu.

Option Explicit
Public RtClkMenu As CommandBarButton
Sub CreateRtClkMenu()
Set RtClkMenu = CommandBars("Cell").Controls.Add _
(Type:=msoControlButton, before:=5)
With RtClkMenu
.Caption = "Your button Title"
.FaceId = 321
.OnAction = "Sub to be called"
.BeginGroup = True
End With
End Sub

I have tried:
Set RtClkMenu = CommandBars("Paste Special Dropdown").Controls.Add _
(Type:=msoControlButton, before:=5)
But have no idea where this is being added to, it is not added to my right
click on a cell when there is something on the clipboard.

Command bar 117 is called Clipboard but is listed as a toolbar and not a
shortcut.

Any assistance will be appreciated.

Thanks.

Sean
 
G

Guest

I couldn't reproduce it. I range you code and right clicked and the menu item
was there. I copied a range to the clipboard and then selected a cell and
right clicked on it and the menu item was there. I went to Outlook and
copied some text to the clipboard, selected a cell and right clicked and the
menu item was there.
 
S

Sean

I am must be blind, indeed, it seems that the item is there. Thanks you for
taking the time to try my code and respond.

Much appreciated.

Sean
 

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