Fellow members of this forum,
I don't now how to make a group sub menu on a rigtmouseclick.
I am using the following [CODE}
Public Sub MuisMenuToevoegen()
'maak menu klaar voor or make menu
Call MuisMenuVerwijderen 'call to remove mousemenu rigtmouseclick
With Application.CommandBars("cell").Controls
' Begin group and let first parting line stand
With .Add(Type:=msoControlButton, Before:=1, temporary:=True)
.Visible = False
.BeginGroup = True
End With
'repeat code between the stars for a next menu item.
'Use and fill caption an onaction on a good way
'****************************************************************************************
'Voeg een nieuw menu item toe
With .Add(Type:=msoControlButton, Before:=1, temporary:=True)
.Caption = "Start &LKV Formulier" 'text you see with you richtmouseclick
.OnAction = "ShowFormulier" 'The (sub) routine call
End With 'between quotes ""
With .Add(Type:=msoControlButton, Before:=1, temporary:=True)
.Caption = "Pas &Scherm aan"
.OnAction = "PasSchermAan"
End With
With .Add(Type:=msoControlButton, Before:=1, temporary:=True)
.Caption = "Kleur &Record"
.OnAction = "KleurRij"
End With
With .Add(Type:=msoControlButton, Before:=1, temporary:=True)
.Caption = "Start &Zoekscherm"
.OnAction = "ZoekScherm"
End With
With .Add(Type:=msoControlButton, Before:=1, temporary:=True)
.Caption = "Start &HelpScherm"
.OnAction = "Helpscherm"
End With
With .Add(Type:=msoControlButton, Before:=1, temporary:=True)
.Caption = "&Onwaar word NEE"
.OnAction = "OnWaarWordNee"
' .Visible = True
End With
With .Add(Type:=msoControlButton, Before:=1, temporary:=True)
.Caption = "&Waar word JA"
.OnAction = "WAARWordJa"
' .Visible = False
End With
'****************************************************************************************
'Dus hier volgende menu item
End With
End Sub
[CODE]
This works pure as menu items but how do i get this as a group sub menu parts.
I need to work with more than one group
See also the attachment.
Bookmarks