Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I've been on this problem for more than a day now and I can't figure it out. I have a worksheet embedded chart which, on right click, shows a modified mouse menu, which in turn allows to fire a sub called "MaakGraf". Like this Set MenuItem = Application.CommandBars("Object/plot").Controls.Add(Type:=msoControlButton) With MenuItem .Caption = "Maak deze Grafiek" .OnAction = "MaakGraf" End With It worked perfectly until yesterday. But since then, when clicking the "Maak deze Grafiek" option, I get a prompt to enable or disable the macro's of an OTHER workbook, to wich there is absolutely no link although this other workbook is very similar to the active one and has a sub with the same name. If enabled, the other workbook is opened. If called with F5 or via the Extra-Macro menu, the sub perfectly refers to the intended sub in the active workbook. What am I overlooking here ? Thank you very much for any help. Herman |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The button is still assigned to the MaakGraf in the other workbook.
I would delete either the "maak deze grafiek" item from the Object/plot commandbar before building it or even delete the whole object/plot commandbar before creating that one. Hermac wrote: Hello, I've been on this problem for more than a day now and I can't figure it out. I have a worksheet embedded chart which, on right click, shows a modified mouse menu, which in turn allows to fire a sub called "MaakGraf". Like this Set MenuItem = Application.CommandBars("Object/plot").Controls.Add(Type:=msoControlButton) With MenuItem .Caption = "Maak deze Grafiek" .OnAction = "MaakGraf" End With It worked perfectly until yesterday. But since then, when clicking the "Maak deze Grafiek" option, I get a prompt to enable or disable the macro's of an OTHER workbook, to wich there is absolutely no link although this other workbook is very similar to the active one and has a sub with the same name. If enabled, the other workbook is opened. If called with F5 or via the Extra-Macro menu, the sub perfectly refers to the intended sub in the active workbook. What am I overlooking here ? Thank you very much for any help. Herman -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks, Dave. That does it indeed. I learned something new here.
Herman |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Mouse shortcut menu | Excel Discussion (Misc queries) | |||
Call Macro using right click menu | Excel Programming | |||
modify mouse menu | Excel Discussion (Misc queries) | |||
Adding menu to the mouse right click pop-up menu | Excel Programming | |||
Send menu call to explicit Sub | Excel Programming |