View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] dave.cuthill@computalog.com is offline
external usenet poster
 
Posts: 53
Default How to figure out which right-click context menu is appearing whenclicking shape/picture

I have recently converted to 2007 from 2003 and have a problem with
accessing the commands on the right click menu for a grouped shape.
This code used to work but now it appears as though another menu is
appearing and I don't believe that "pictures context menu" is it
either. So the question is how to determine the name of the menu I
see?

Application.CommandBars("Shapes").Reset

Dim CB As CommandBar
Dim Ctrl As CommandBarControl

Set CB = .CommandBars("Shapes")

For Each Ctrl In CB.Controls
Ctrl.Delete
Next
Set Ctrl = CB.Controls.Add(Type:=msoControlButton)
With Ctrl
.Caption = "Insert Picture"
.OnAction = "CompInsert"
.FaceId = 295
End With
Set Ctrl = CB.Controls.Add(Type:=msoControlButton)
With Ctrl
.Caption = "Delete Picture"
.OnAction = "CompDelete"
.FaceId = 292
End With