ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Modifying the right-click popup menu of a shape (https://www.excelbanter.com/excel-programming/272361-modifying-right-click-popup-menu-shape.html)

Don Lopez

Modifying the right-click popup menu of a shape
 
I would like to add an item to the right-click menu of all of the
shapes in a particular workbook of mine. This will launch a sub that
goes into an Access database and resizes the shape depending on the
calculated time left to produce the order. Is this possible? I would
definately like to keep the default menu items there too.

I noticed also that VB code doesn't seem to run when a shape is
selected (I get a beep and nothing happens) Is this going to prevent
me from launching code from the right-click menu of a shape? Does
anyone know of any websites/resources that could get me up to speed on
Excel shapes?

Any help would be greatly appreciated!

DL

john Dijkman

Modifying the right-click popup menu of a shape
 
Don, try this

Sub addtoshortcutMN()
Set AddItem = CommandBars("shapes").Controls.Add
With AddItem
.Caption = "test"
.OnAction = "testmacro"
.BeginGroup = True
End With
End Sub

Sub RESETaddtoshortcutMN()
CommandBars("shapes").Reset
End Sub


-----Original Message-----
I would like to add an item to the right-click menu of

all of the
shapes in a particular workbook of mine. This will

launch a sub that
goes into an Access database and resizes the shape

depending on the
calculated time left to produce the order. Is this

possible? I would
definately like to keep the default menu items there too.

I noticed also that VB code doesn't seem to run when a

shape is
selected (I get a beep and nothing happens) Is this going

to prevent
me from launching code from the right-click menu of a

shape? Does
anyone know of any websites/resources that could get me

up to speed on
Excel shapes?

Any help would be greatly appreciated!

DL
.


Don Lopez

Modifying the right-click popup menu of a shape
 
That worked perfectly. Thank you.


"John Dijkman" wrote in message ...
Don, try this

Sub addtoshortcutMN()
Set AddItem = CommandBars("shapes").Controls.Add
With AddItem
.Caption = "test"
.OnAction = "testmacro"
.BeginGroup = True
End With
End Sub

Sub RESETaddtoshortcutMN()
CommandBars("shapes").Reset
End Sub


-----Original Message-----
I would like to add an item to the right-click menu of

all of the
shapes in a particular workbook of mine. This will

launch a sub that
goes into an Access database and resizes the shape

depending on the
calculated time left to produce the order. Is this

possible? I would
definately like to keep the default menu items there too.

I noticed also that VB code doesn't seem to run when a

shape is
selected (I get a beep and nothing happens) Is this going

to prevent
me from launching code from the right-click menu of a

shape? Does
anyone know of any websites/resources that could get me

up to speed on
Excel shapes?

Any help would be greatly appreciated!

DL
.



All times are GMT +1. The time now is 07:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com