I have to write a program that moves the button of a horizontal scrollbar, then stretches a line objetct to match the value property of the scrollbar button. I wrote code for it and it is running, but it looks like the line is stretching much further than the value of the scrollbar button. Am I doing this right?

Here is the code:

Private Sub HScroll1_Change()
Dim x1 As Single, x2 As Single
HScroll1.Value = HScroll1.Max
Line1.x2 = Line1.x1 + HScroll1.Value

End Sub