Sorry, I typed "Ply" incorrectly as "Plyl" in the With line....
With Application.CommandBars("Ply")
--
HTH,
Bernie
MS Excel MVP
"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
Sub ChangeSheetMenu()
With Application.CommandBars("Plyl")
.Reset
.Enabled = True
With .Controls.Add(Type:=msoControlButton, Befo=1)
.Caption = "New Macro"
.Style = msoButtonIconAndCaption
.FaceId = 59
.OnAction = "MyFile.xls!MacroName"
End With
End With
End Sub
Sub ResetSheetMenu()
Application.CommandBars("Ply").Reset
End Sub
--
HTH,
Bernie
MS Excel MVP
"RB Smissaert" wrote in message
...
Thanks, where do I find how to add an item?
RBS
"Robert Bruce" <rob@analytical-dynamicsdotcodotukay wrote in message
...
Roedd <<RB Smissaert wedi ysgrifennu:
How do I add an item to the sheet right-click menu programmatically?
I am sure it can be done, but I can't find it now.
RBS
Lots of useful menuitem stuff he
<
http://www33.brinkster.com/rbad/defa...r&Page=menuite
m
or
http://tinyurl.com/8vpw8
--
Rob
http://www.asta51.dsl.pipex.com/webcam/
This message is copyright Robert Bruce and intended
for distribution only via NNTP.
Dissemination via third party Web forums with the
exception of Google Groups and Microsoft Communities
is strictly prohibited and may result in legal action.