i have made some code to create a line and set one end of it to the curunt
cursor location:
Code:
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
i = X
p = Y
a = a + 1

   c = "g" & (a)
    Set c = Controls.Add("VB.line", (c))
    c.Visible = True

c.X1 = i
c.Y1 = p
the problem is that when i releese the mouse button i want to draw the other end of the line.
but when i say
Code:
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
c.X2 = i
c.Y2 = p
End Sub
an error comes up that says : "object required"

i know this is probebly a simple question but just can't figure it out!
thanx
mr smither