VBA, excel 2007, alleen eigen snelmenu bij klikken rechter-muisknop

Status
Niet open voor verdere reacties.

jackfish

Gebruiker
Lid geworden
10 sep 2010
Berichten
297
Het is gelukt om een extra item op het snelmenu te krijgen. Ik lees tegenstrijdige berichten over de mogelijkheid om 'vaste' items van het snelmenu te wissen. Wie weet of dat mogelijk is?

Gr jackfish
 
Het waren loodzware dagen ... maar ik heb de code bij elkaar gesprokkeld.
Sub fACTMenu()

Dim ctl As CommandBarControl

Application.CommandBars("Cell").Reset
Application.DisplayAlerts = False

With Application.CommandBars("cell").Controls.Add
.Style = msoButtonIconAndCaption
.Caption = "Testje..."
.FaceId = 346
.OnAction = "Naam Macro hier"
.BeginGroup = True 'voor een afscheidingsstreepjé
End With

'Kopieer het blok hierboven en plak het, aangepast naar eigen voorkeuren, hier.

Application.CommandBars("cell").Controls("Knippen").Delete
Application.CommandBars("cell").Controls("Kopiëren").Delete
Application.CommandBars("cell").Controls("Plakken").Delete
Application.CommandBars("cell").Controls("Plakken Speciaal...").Delete

Application.CommandBars("cell").Controls("Invoegen...").Delete
Application.CommandBars("cell").Controls("Verwijderen...").Delete
Application.CommandBars("cell").Controls("Inhoud Wissen").Delete

Application.CommandBars("cell").Controls("Filteren").Delete
Application.CommandBars("cell").Controls("Sorteren").Delete

Application.CommandBars("cell").Controls("Opmerking Invoegen").Delete

Application.CommandBars("cell").Controls("Celeigenschappen...").Delete
Application.CommandBars("cell").Controls("Uit vervolgkeuzelijst selecteren...").Delete
Application.CommandBars("cell").Controls("Een bereik benoemen...").Delete
Application.CommandBars("cell").Controls("Hyperlink...").Delete

End Sub

Gr jackfish
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan