Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Add control to right click menu when something is on the clipboard

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, befo=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, befo=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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Add control to right click menu when something is on the clipboard

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.

--
Regards,
Tom Ogilvy


"Sean" wrote:

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, befo=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, befo=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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Add control to right click menu when something is on the clipboard

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

"Tom Ogilvy" wrote in message
...
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.

--
Regards,
Tom Ogilvy


"Sean" wrote:

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, befo=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, befo=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





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to copy the value of cell into clipboard by double click [email protected] Excel Worksheet Functions 2 March 22nd 07 01:33 PM
how to copy on double-click the cell value to Clipboard cyrille Excel Worksheet Functions 2 February 15th 05 05:56 PM
Adding a menu item right click menu when clicking on a single. Andoni[_28_] Excel Programming 0 September 2nd 04 10:23 PM
Auto-Click Save on Clipboard sowetoddid[_17_] Excel Programming 1 April 28th 04 01:15 AM
Adding menu to the mouse right click pop-up menu Jack Excel Programming 1 February 12th 04 05:23 AM


All times are GMT +1. The time now is 12:02 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"