Hello,
I am trying to build a chart in VISIO from Excel VBA.
For starter I have the following code whcih does not work. I think I used the proper references.
Please advise
Thank you
Sub DrawThreeRectangles()
Dim rect1 As Visio.Shape
Dim rect2 As Visio.Shape
Dim rect3 As Visio.Shape
Set rect1 = ActivePage.DrawRectangle(0, 0, 1, 1)
Set rect2 = ActivePage.DrawRectangle(2, 2, 3, 3)
Set rect3 = ActivePage.DrawRectangle(4, 4, 5, 5)
rect1.Text = "First"
rect2.Text = "Second"
rect3.Text = "Third"
End Sub
I am trying to build a chart in VISIO from Excel VBA.
For starter I have the following code whcih does not work. I think I used the proper references.
Please advise
Thank you
Sub DrawThreeRectangles()
Dim rect1 As Visio.Shape
Dim rect2 As Visio.Shape
Dim rect3 As Visio.Shape
Set rect1 = ActivePage.DrawRectangle(0, 0, 1, 1)
Set rect2 = ActivePage.DrawRectangle(2, 2, 3, 3)
Set rect3 = ActivePage.DrawRectangle(4, 4, 5, 5)
rect1.Text = "First"
rect2.Text = "Second"
rect3.Text = "Third"
End Sub