adding an option in the right click menu
Hallo,
I would like to add the option "copyto notepad" when I right-click on any cell. Any suggestions how to do this, so the text in the cell will automatically be copied to notepad ? Thanks very much ! Kontiki |
Hi
as starting point some code: Sub Add_Item() Dim New_Entry As Object Set New_Entry = CommandBars("Cell").Controls.Add(Temporary:=True) On Error Resume Next New_Entry.Controls("My message").Delete On Error Goto 0 With New_Entry .Caption = "My message" .OnAction = "Message" End With End Sub Sub Message() MsgBox "Now you code yould start" End Sub Sub Delete_Item() Dim myControl As CommandBarButton For Each myControl In CommandBars("Cell").Controls If myControl.Caption = "My message" Then myControl.Delete End If Next End Sub -- Regards Frank Kabel Frankfurt, Germany "kontiki" schrieb im Newsbeitrag om... Hallo, I would like to add the option "copyto notepad" when I right-click on any cell. Any suggestions how to do this, so the text in the cell will automatically be copied to notepad ? Thanks very much ! Kontiki |
All times are GMT +1. The time now is 06:05 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com