ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Recreate a macro menu (https://www.excelbanter.com/excel-programming/292072-recreate-macro-menu.html)

sdyman

Recreate a macro menu
 
I create my own menu with sub menu in Excel 97 and they are al
associated with macros. Now, I want to put this menu on othe
computers but their's too much sub-menu to recreate them all manually
so I tried to make a macro witch make those menus, but it doesn't work
When I execute the macro, the menu is blank and the macros aren'
associated with the menus. When I look to the generated code I se
that:
Application.CommandBars("Worksheet Menu Bar").Controls.Add Type:
_
msoControlPopup, Befo=11
Application.CommandBars("Menu contextuel personnalis
1").Controls.Add Type:= _
msoControlButton, ID:=2949, Befo=1
Application.CommandBars("Menu contextuel personnalis
1").Controls.Add Type:= _
msoControlButton, ID:=2949, Befo=2

So there's no rename action and no associated macro.

I could program in VB but know nothing in VBA
(I use a French Excel 97

--
Message posted from http://www.ExcelForum.com


Andy Wiggins[_3_]

Recreate a macro menu
 
This file might be a help:
http://www.bygsoftware.com/examples/...tiveWbDemo.zip
It's in the "Menu Routines" section on page:
http://www.bygsoftware.com/examples/examples.htm

It contains VBA code that will activate a menu only when the workbook it is
in is active.

The code is open and commented.


--
Regards
Andy Wiggins
www.BygSoftware.com
Home of "Save and BackUp",
"The Excel Auditor" and "Byg Tools for VBA"



"sdyman " wrote in message
...
I create my own menu with sub menu in Excel 97 and they are all
associated with macros. Now, I want to put this menu on other
computers but their's too much sub-menu to recreate them all manually,
so I tried to make a macro witch make those menus, but it doesn't work.
When I execute the macro, the menu is blank and the macros aren't
associated with the menus. When I look to the generated code I see
that:
Application.CommandBars("Worksheet Menu Bar").Controls.Add Type:=
_
msoControlPopup, Befo=11
Application.CommandBars("Menu contextuel personnalise
1").Controls.Add Type:= _
msoControlButton, ID:=2949, Befo=1
Application.CommandBars("Menu contextuel personnalise
1").Controls.Add Type:= _
msoControlButton, ID:=2949, Befo=2

So there's no rename action and no associated macro.

I could program in VB but know nothing in VBA
(I use a French Excel 97)


---
Message posted from http://www.ExcelForum.com/




sdyman[_2_]

Recreate a macro menu
 
It's seems to be a good exemples, I will read that, tank you very much!
:

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 05:33 PM.

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