Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
i think popup menus in excel 07 not same as before. you see their font color
is blu but if you make old popup show like by CommandBars("cell").ShowPopup you see font is black. i think MS change something here and maybe users can no more change popup menus. Also if you list all popups and there controls you dont see any that match new menus Sub ListPopups() Dim CB As CommandBar Dim Ctrl As CommandBarControl Dim RowCounter As Integer Dim ColCounter As Integer For Each CB In CommandBars If CB.Type = msoBarTypePopup Then RowCounter = RowCounter + 1 Cells(RowCounter, 1).Value = CB.Name ColCounter = 1 For Each Ctrl In CB.Controls ColCounter = ColCounter + 1 Cells(RowCounter, ColCounter).Value = Ctrl.Caption Next End If Next End Sub wrote in message ... |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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If that is the case then is there a way to deactivate the right click
menu for shapes/pictures. I can get it to work on the cells on the sheet by setting cancel=true in the beforerightclick procedure for the worksheet but it does not have any affect on the shapes/pictures on the sheet. On Jun 11, 5:04*am, "Homey" <none wrote: i think popup menus in excel 07 not same as before. you see their font color is blu but if you make old popup show like by CommandBars("cell").ShowPopup you see font is black. i think MS change something here and maybe users can no more change popup menus. Also if you list all popups and there controls you dont see any that match new menus Sub ListPopups() * * Dim CB As CommandBar * * Dim Ctrl As CommandBarControl * * Dim RowCounter As Integer * * Dim ColCounter As Integer * * For Each CB In CommandBars * * * * If CB.Type = msoBarTypePopup Then * * * * * * RowCounter = RowCounter + 1 * * * * * * Cells(RowCounter, 1).Value = CB.Name * * * * * * ColCounter = 1 * * * * * * For Each Ctrl In CB.Controls * * * * * * * * ColCounter = ColCounter + 1 * * * * * * * * Cells(RowCounter, ColCounter).Value = Ctrl.Caption * * * * * * Next * * * * End If * * Next End Sub wrote in message ... |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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Screwed Up my Right Click Context Menu, Please Help | Excel Programming | |||
Undo button in the context menu (right click menu) | Excel Programming | |||
Custom Context menu (Right click menu) not working in sheet changeevent. | Excel Programming | |||
Right click Drag and Drop context menu | Excel Programming | |||
Right-Click (Context Menu) | Excel Programming |