ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Menu Item Property (https://www.excelbanter.com/excel-programming/423156-menu-item-property.html)

tony

Menu Item Property
 
I am creating a symbol editor using VBA. I want to select item function from
different Default menus and add them to mine. I can get down to the .Action
property however I can not read the macro name assigned to this property even
though MSDN documentation declares (repeatly) that the .OnAction is a
read/write property. When I tryv to read the propertyvI get errors. Could
someone shed light on this please help.

Second I know that there is a way to hide a macro. I would like "unhide"
item macro --ie drawing a line -- and examine it. Possibly copy it modify it
for my purposes and resave as a user defined macro. Please Help

Tony

Leith Ross[_746_]

Menu Item Property
 

tony;203642 Wrote:
I am creating a symbol editor using VBA. I want to select item function
from
different Default menus and add them to mine. I can get down to the
.Action
property however I can not read the macro name assigned to this
property even
though MSDN documentation declares (repeatly) that the .OnAction is a
read/write property. When I tryv to read the propertyvI get errors.
Could
someone shed light on this please help.

Second I know that there is a way to hide a macro. I would like
"unhide"
item macro --ie drawing a line -- and examine it. Possibly copy it
modify it
for my purposes and resave as a user defined macro. Please Help

Tony


Hello Tony,

Not all menu items have an OnAction property. Built-in menu items like
Copy, Paste, and Save have an ID property. Excel uses this to locate the
routine to execute when the item is selected. You can use these ID
numbers with custom menu items to invoke them. You can access the code
for the routines like a regular macro.


--
Leith Ross

Sincerely,
Leith Ross

'The Code Cage' (http://www.thecodecage.com/)
------------------------------------------------------------------------
Leith Ross's Profile: http://www.thecodecage.com/forumz/member.php?userid=75
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=55970


tony

Menu Item Property
 
I am talking about the drawing menu these menu items have .OnAction attribute
but I do not know what it is I cannot read the macro name.

How do you find out the codes for systems macro

"Leith Ross" wrote:


tony;203642 Wrote:
I am creating a symbol editor using VBA. I want to select item function
from
different Default menus and add them to mine. I can get down to the
.Action
property however I can not read the macro name assigned to this
property even
though MSDN documentation declares (repeatly) that the .OnAction is a
read/write property. When I tryv to read the propertyvI get errors.
Could
someone shed light on this please help.

Second I know that there is a way to hide a macro. I would like
"unhide"
item macro --ie drawing a line -- and examine it. Possibly copy it
modify it
for my purposes and resave as a user defined macro. Please Help

Tony


Hello Tony,

Not all menu items have an OnAction property. Built-in menu items like
Copy, Paste, and Save have an ID property. Excel uses this to locate the
routine to execute when the item is selected. You can use these ID
numbers with custom menu items to invoke them. You can access the code
for the routines like a regular macro.


--
Leith Ross

Sincerely,
Leith Ross

'The Code Cage' (http://www.thecodecage.com/)
------------------------------------------------------------------------
Leith Ross's Profile: http://www.thecodecage.com/forumz/member.php?userid=75
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=55970



Leith Ross[_747_]

Menu Item Property
 

tony;204226 Wrote:
I am talking about the drawing menu these menu items have .OnAction
attribute
but I do not know what it is I cannot read the macro name.

How do you find out the codes for systems macro

"Leith Ross" wrote:


tony;203642 Wrote:
I am creating a symbol editor using VBA. I want to select item

function
from
different Default menus and add them to mine. I can get down to

the
.Action
property however I can not read the macro name assigned to this
property even
though MSDN documentation declares (repeatly) that the .OnAction is

a
read/write property. When I tryv to read the propertyvI get

errors.
Could
someone shed light on this please help.

Second I know that there is a way to hide a macro. I would like
"unhide"
item macro --ie drawing a line -- and examine it. Possibly copy it
modify it
for my purposes and resave as a user defined macro. Please Help

Tony


Hello Tony,

Not all menu items have an OnAction property. Built-in menu items

like
Copy, Paste, and Save have an ID property. Excel uses this to locate

the
routine to execute when the item is selected. You can use these ID
numbers with custom menu items to invoke them. You can access the

code
for the routines like a regular macro.


--
Leith Ross

Sincerely,
Leith Ross

'The Code Cage' ('The Code Cage' (http://www.thecodecage.com/))

------------------------------------------------------------------------
Leith Ross's Profile: 'The Code Cage Forums - View Profile: Leith

Ross' (http://www.thecodecage.com/forumz/me...eith-ross.html)
View this thread: 'Menu Item Property - The Code Cage Forums'

(http://www.thecodecage.com/forumz/sh...ad.php?t=55970)



Hello Tony,

You can not access the *OnAction* property because they are builtin
menu items (system macros). Properties may be visible but not accessible
depending upon the object.


--
Leith Ross

Sincerely,
Leith Ross

'The Code Cage' (http://www.thecodecage.com/)
------------------------------------------------------------------------
Leith Ross's Profile: http://www.thecodecage.com/forumz/member.php?userid=75
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=55970



All times are GMT +1. The time now is 12:23 AM.

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