1
我有一个Excel中的流程设计(使用形状,连接器等)。 我需要的是有一个矩阵,并为每一个形状拥有所有的前辈和所有的后继者。 在VBA中,要做到这一点,我试图做的是: - 我列出了所有连接器(Shapes.AutoShapeType = -2) - 对于每一个我想要的形状名称'from'和形状'的名称。VBA获取连接器'从形状'和'成形'
我希望你明白。 我没有找到连接器的属性来检索这个信息。
这是我到目前为止有:
Sub getTransitions()
''the sheet with the design
Set designSheet = Sheets("DesignSheet")
Set tempSheet = Sheets("temp") 'Sheets.Add
lLoop = 0
'Loop through all shapes on active sheet
For Each sShapes In designSheet.Shapes
'Increment Variable lLoop for row numbers
With sShapes
''connector shape type
If ((sShapes.AutoShapeType) = -2) Then
lLoop = lLoop + 1
tempSheet.Cells(lLoop + 1, 1) = sShapes.Name
tempSheet.Cells(lLoop + 1, 2) = sShapes.AutoShapeType
''here I want to have for the sShapes the from shape and the to shape
End If
End With
Next sShapes
End Sub
有谁知道有这个信息形状参数?
是的,我只是觉得我自己也是。谢谢。 –
不客气。 – JAB