seba64
New Member
- Joined
- Apr 24, 2016
- Messages
- 32
Hi. I hope you can helpme.
I have a visio document (vsd) with several numbered balloons that change color according to their state. States should read them from an excel table. Think of doing a procedure that allows me to change the color of each balloon by the number that has the text property.
Something like that:
thanks for read.
I have a visio document (vsd) with several numbered balloons that change color according to their state. States should read them from an excel table. Think of doing a procedure that allows me to change the color of each balloon by the number that has the text property.
Something like that:
Code:
Sub changecolor()
Dim objVis As Object
Set objVis = CreateObject("Visio.Application")
objVis.Documents.OpenEx filepath, visOpenRW
objVis.Windows.ItemEx(1).Activate
With objVis
.Documents.OpenEx ruta, visOpenRW
count = 0
For Each b In objVisAppVisio.ActiveWindow.Page.Shapes
If b.Text = item Then
count = count + 1
b.CellsSRC(visSectionObject, visRowFill, visFillForegnd).FormulaU = "THEMEGUARD(" & color & ")"
End If
Next
Debug.Print count
End With
End Sub
thanks for read.