Hi, thank you so much for your help.
Your code works perfectly but I asked myself: how can I find the perpendicular distance between the two parallel lines?

I tried like this:
ed.WriteMessage (vbLf & "Perpendicular distance beetwen line1 and line2:" & line.StartPoint.DistanceTo (source.GetClosestPointTo (line.StartPoint, False)))
What I have written only works in three cases:
1. when the two lines are inclined at a certain angle;
2. when the two lines have the same length;
3. when I select the longest line.
If the two lines, horizontal or vertical, have a different length and I select the shorter line, I get the distance between points A and C and not the perpendicular distance between the two lines.
Where do you think I'm wrong?
Thanks a lot, bye.