Kontextmenü einer
Zelle:
Const t = "Meine eigene Routine"
Sub Kontextmenü_Erweitern()
Call Kontext_Löschen
Dim Kontext As Object
Set Kontext = CommandBars("Cell").Controls.Add
Kontext.BeginGroup = True
With Kontext
.Caption = t
.OnAction = "MachWas"
.FaceId = 122
End With
End Sub
Sub Kontext_Löschen()
On Error Resume Next
CommandBars("Cell").Controls(t).Delete
End Sub
Sub MachWas()
MsgBox "Hallo, da bin ich !", vbExclamation
End Sub
|