View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
John Green[_2_] John Green[_2_] is offline
external usenet poster
 
Posts: 58
Default Shape connectors

Assuming that you have used the connector shapes to join your objects, you can identify them and discover which shapes are connected
to which other shapes with code like the following:

Sub Test()
Dim shp As Shape

For Each shp In ActiveSheet.Shapes
If shp.Connector Then
Debug.Print shp.ConnectorFormat.BeginConnectedShape.Name & _
" connected to " & _
shp.ConnectorFormat.EndConnectedShape.Name
End If
Next shp
End Sub

This might get you started,

--

John Green - Excel MVP
Sydney
Australia


"Davwe" wrote in message ...
I have made a decisionchart on an excelsheet. ( a flowchart with actions
and decisions and connectorlines between them)


Now I have written a macro that reads all shapes and puts the
properties in an array. But for each shape I also want to know to
which other shapes it is connected.

like

shape 1 name: Action1 connected to Decision1
shape 2 name: Decision1 connected to Decision2 and Action2
shape 3 name Decision2 connecter to Action3
etc

How can I do this

With mydocument.Shapes
For i = .Count To 1 Step -1

ActiveSheet.Shapes(i).Select
Tname(i) = ActiveSheet.Shapes(i).AlternativeText
Tconnect1(i) = ????
Tconnect2(i) = ????
Next
End With

see attached file

File Attached: http://www.exceltip.com/forum/attach...?postid=293427 (book1.xls)

------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/