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
|