Private Sub CommandButton1_Click()
Dim mySpiral As Visio.Shape
Dim I As Integer
Dim xypts(1 To 500 * 2) As Double
For I = 1 To 500
'Set x components
xypts(I * 2 - 1) = 4 + (I / 300 * Cos(I / 20))
'Set y components
xypts(I * 2) = 3 + (I / 300 * Sin(I / 20))
Next I
Set mySpiral = ActivePage.DrawSpline(xypts, 0, visSplineAbrupt)
End Sub