A
AntonioG
Hello all,
I'm new in Visio developement and have a litte problem.
I created a Custom Properties row using Visio interface and I'm trying to
access its "Value" using Visual Basic. I wrote this code but the value
returned by Cells property of a shape object is always 0. The code follow:
Private Sub UserForm_Initialize()
Dim vsoShape As Visio.Shape
Dim vsoSelection As Visio.Selection
Dim vsoWindow As Visio.Window
Dim vsoCell As Visio.Cell
Dim str1 As String
str1 = "Prop.Row_2.Value"
Set vsoWindow = ActiveWindow
Set vsoSelection = vsoWindow.Selection
Set vsoShape = vsoSelection.Item(1)
If vsoShape.CellExists(str1, 0) Then ' The cell exists
Set vsoCell = vsoShape.Cells(str1) ' Always returns 0
' Any operation with vsoCell object causes an error
End If
End Sub
Please, could anyone help me ?
Thanks in advance.
I'm new in Visio developement and have a litte problem.
I created a Custom Properties row using Visio interface and I'm trying to
access its "Value" using Visual Basic. I wrote this code but the value
returned by Cells property of a shape object is always 0. The code follow:
Private Sub UserForm_Initialize()
Dim vsoShape As Visio.Shape
Dim vsoSelection As Visio.Selection
Dim vsoWindow As Visio.Window
Dim vsoCell As Visio.Cell
Dim str1 As String
str1 = "Prop.Row_2.Value"
Set vsoWindow = ActiveWindow
Set vsoSelection = vsoWindow.Selection
Set vsoShape = vsoSelection.Item(1)
If vsoShape.CellExists(str1, 0) Then ' The cell exists
Set vsoCell = vsoShape.Cells(str1) ' Always returns 0
' Any operation with vsoCell object causes an error
End If
End Sub
Please, could anyone help me ?
Thanks in advance.