Public Sub addCellMenu()
removeCellMenu 'just in case
With Application.CommandBars("Cell")
.Controls.Add(Type:=msoControlButton).Caption = "Routine1"
.Controls.Add(Type:=msoControlButton).Caption = "Routine2"
.Controls("Routine1").BeginGroup = True
.Controls("Routine1").OnAction = "Another"
.Controls("Routine2").OnAction = "YetMore"
End With
End Sub
Public Sub removeCellMenu()
On Error Resume Next
With Application.CommandBars("Cell")
.Controls("Routine1").Delete
.Controls("Routine2").Delete
End With
On Error GoTo 0
End Sub
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.