Ian Lucas
2014-02-20T08:31:04Z
Hi,

I've managed to produce a custom right-click menu for column headers and to get it to appear in response to a right-click event.

The code for the custom menu is adapted code by Ron De Bruin at http://www.rondebruin.nl/win/s6/win002.htm  .

It works fine in Excel when just attached to a worksheet.

But in iGrid, when I click a menu item I get an error message from Word saying that it cannot find the macro, or the macro has been blocked due to my security settings.

My security settings are set to "enable all macros". The macro itself is just a messagebox.

Any suggestions?

Best wishes,

Ian
Ian Lucas
2014-02-20T20:56:31Z
I have a solution of sorts.

I checked Word's list of macros and found that the macro I was seeking to invoke wasn't listed.

I shifted it to another module and Hey Presto, suddenly Word can see it and it works!

Weird, but I'm glad it wasn't something to do with iGrid. Can anyone tell me what's going on?
Igor/10Tec
2014-02-21T08:39:26Z
We need to see the full source code of your solution to give some ideas, but obviously this is not a topic for this forum regarding 10Tec products 🙂
Oliver
2014-02-26T15:37:16Z
Originally Posted by: Ian Lucas 

I have a solution of sorts.

I checked Word's list of macros and found that the macro I was seeking to invoke wasn't listed.

I shifted it to another module and Hey Presto, suddenly Word can see it and it works!

Weird, but I'm glad it wasn't something to do with iGrid. Can anyone tell me what's going on?



For a "macro" to be available for Word or to be called by a context menu, it needs to be in a plain global code-module, not a class-, form- or other module. (And it may not be private) When you moved it somewhere else, I guess you did excatly that.

Regards,
Oliver
Igor/10Tec
2016-01-29T10:20:35Z
The ability to add custom items to the built-in context menus or completely redefine them was implemented in iGrid v6.