Hi gplawton,
I had a much closer look at what you want and it appears that it's a mathematical problem that you're maybe trying to do plotted examples for using VBA.
Following on in the vein of MD and Dreamboat said, without going into the maths side of it I can point out several problems with your actual code[vba]
Sub twolines()
'get the coordinates (abscissa and the ordinate)
getthedata
'for each pair of points, determine whether they actually defined
Dim line1isdefined As Boolean '< can only be true or false (MD)
line1isdefined = "isline Defined(1)" '< RHS is neither true nor false (MD)
If line1 isdefined Then '< you have a space here, line1 is not declared (MD)
MsgBox ("line 1 is defined")
Else
MsgBox (" line 1 is not defined")
End If
End Sub
Sub getthedata()
'you need to declare the variables in the sub unless you
'mean them to be public variables. In which case you
'would put them up top (as you had them), but you then
'need to use Public instead of Dim...
Dim l1p1x As Single, l1p1y As Single
Dim l1p2x As Single, l1p2y As Single
Dim l2p1x As Single, l2p1y As Single
Dim l2p2x As Single, l2p2y As Single
l1p1x = Range("line1 point1 xvalue") '< I assume these are named ranges
l1p1y = Range("line1 point1 yvalue")
l2p1x = Range("line2 point1 xvalue")
l2p1y = Range("line2 point1 yvalue")
l1p2x = Range("line1 point2 xvalue")
l1p2y = Range("line1 point2 yvalue")
l2p2x = Range("line2 point2 xvalue")
l2p2y = Range("line2 point2 yvalue")
End Sub
HTH,
John