Manipulating a vertex's neighbors

May 9, 2012 at 6:37 PM

Hi everyone; 

I need to manipulate only a vertex's neighbors in discrete steps. Is it possible to do so using a VBA macro??  

May 9, 2012 at 10:19 PM

Do you mean that you want to do something to the rows for a vertex's neighbors, and then to the rows for those vertices' neighbors, and so on?  If so, then yes, you can use VBA to modify the rows in the Vertices worksheet, or in any worksheet for that matter.  However, you would need to figure out how the vertices are connected to each other, and that involves reading and analyzing the Edges worksheet.  In effect, you would have to create your own VBA version of the graph structure to figure out the vertex's neighbors.

I don't know if it's relevant to your case, but you can right-click a vertex in the graph pane, choose Select Subgraphs from the right-click menu, and have NodeXL select one or more levels of a vertex's adjacent vertices.  (An "adjacent vertex" is what you call a neighbor.)  That's not programmable via VBA, though.

-- Tony