Hi,
I have created a visio having 3500 shape ID's. All linked with Excel.
Now I want to link these with 15 different layers.
I am not able to do so...
I have been trying to use this code:
-------------------------------------------------------------------
Sub Macro5()
Dim j As Integer
Dim i As Integer
Dim application_cluster As String
Dim rowmane As String
Dim application_interface As String
For j = 1 To 3500
Application.ActiveWindow.Page.Shapes.ItemFromID(j).OpenSheetWindow
i = 0
Do While i <= 30
i = i + 1
If (Application.ActiveWindow.Shape.CellsSRC(visSectionProp, i, visCustPropsLabel).RowNameU = "_VisDM_UID") Then
If (Application.ActiveWindow.Shape.CellsSRC(visSectionProp, i, visCustPropsValue).FormulaU) = 331 Then
Application.ActiveWindow.Page.Shapes.ItemFromID(j).CellsSRC(visSectionObject, visRowLayerMem, visLayerMember).FormulaForceU = """9"""
ElseIf Application.ActiveWindow.Shape.CellsSRC(visSectionProp, i, visCustPropsValue).FormulaU = 340 Then
Application.ActiveWindow.Page.Shapes.ItemFromID(j).CellsSRC(visSectionObject, visRowLayerMem, visLayerMember).FormulaForceU = """8"""
End If
End If
On Error GoTo ErrorHandler
Loop
On Error GoTo ErrorHandler
Next j
ErrorHandler:
Resume Next
End Sub
-------------------------------------------------------------------
The logic here is...
J = 1 to 3500, is to use all shape ID's...
Now each shape has different columns from attached excel...
i = 0 to 30... is used...
First i am trying to get the column name... if its UID.. then checking its value, if its some specific value then assigning the layer....
Please see if you can help me....