Can you check the coding here please?
Try this:
With Application.CommandBars("Standard")
.Controls(ID:=2950)
.OnAction = "myMacro"
End With
Regards,
Rob
Richard wrote:
Hello,
I'm trying to assgin a macro on existing menu (that I added previousely) in
command bar as below, but I 'm getting a error. By the way, ID:2950 is the
Smiley face icon.
Can anyone help me to fix it, please?
Error msg is "name or argument not found"
With Application.CommandBars("Standard").Controls(ID:=2 950)
.OnAction = "myMacro"
End With
|