Signature (Visual Basic / VBA)
Public Function MakeLine( _
ByVal vX1 As Variant _
, ByVal vY1 As Variant _
, ByVal vX2 As Variant _
, ByVal vY2 As Variant _
) As Variant
Code Example
Assuming
Dim varLine1 As Variant
varLine1 = MakeLine(2, 3, 4, 5)
for example
VarType(varPoint1) = vbVariant + vbArray
LBound(varPoint1) = 0
UBound(varPoint1) = 1
LBound(varPoint(0)) = 0
UBound(varPoint(0)) = 1
LBound(varPoint(1)) = 0
UBound(varPoint(1)) = 1
varPoint(0)(0) = 2
varPoint(0)(1) = 3
varPoint(1)(0) = 4
varPoint(1)(1) = 5
and
LinesIntersect(varLine1, varLine1) = True
Parameters
| Parameter | Description |
|---|---|
| vX1 | Number representing the X-coordinate of the first point on the line segment. |
| vY1 | Number representing the Y-coordinate of the first point on the line segment. |
| vX2 | Number representing the X-coordinate of the second point on the line segment. |
| vY2 | Number representing the Y-coordinate of the second point on the line segment. |
Notes & Version History
| Note | Function will always return the "line" even if one or more of the arguments is not a number. |
| Note | The function will generate an error if any of the arguments is an object pointer or an error. |