Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
kontiki
 
Posts: n/a
Default 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
  #2   Report Post  
Frank Kabel
 
Posts: n/a
Default

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



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
Disable menu selection andy Excel Discussion (Misc queries) 3 December 10th 04 10:46 PM
canot remove command from FILE MENU EXCEL CUstomization Excel Discussion (Misc queries) 2 December 7th 04 01:10 AM
What does Insert>name>LABEL option do ? Ali.Abbas.810 Excel Discussion (Misc queries) 1 December 5th 04 08:40 AM
XML Source Menu Item disabled?? File version?? Jay Lauffer Excel Discussion (Misc queries) 1 December 3rd 04 10:23 PM
How to remove an Excel Main Menu item inserted by .xla file Dennis Excel Discussion (Misc queries) 5 November 28th 04 08:39 PM


All times are GMT +1. The time now is 12:33 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"