Macro/ VBA options in NodeXL

Jun 19, 2013 at 7:29 AM

Is it possible to include the button “refresh graph” and changing the graph from “directed” into “undirected” to a macro or a vba-code?

Thank you for your help

Cheers Alex

(PS: need that for my bachelor thesis)
Jun 19, 2013 at 5:16 PM
Edited Jun 19, 2013 at 5:24 PM

A few years ago, I tried to do what you're describing. My technique was to use VBA to iterate through all the controls in the Excel ribbon, looking for the NodeXL-specific controls I had placed there (I'm the NodeXL programmer) so I could "click" them. I believe I used Excel's CommandBars collection. Surprisingly, there was no sign of the NodeXL ribbon tab or any of its children anywhere in the collection. Apparently, Excel doesn't make custom ribbon enhancements available to VBA code. The CommandBars collection contained only Excel's built-in controls.

That's not to say that what you want to do is impossible, only that my own attempts failed. One thing I meant to look at but didn't have the time for was Microsoft's "UI Automation Framework" ( I don't know offhand if that can be made to work from VBA.

If you find some solution, please let me know. At least one other person has asked about this.

-- Tony