1. Is that VB or VBA? Looks like VB to me

2. Can you attach a workbook that has the X-Y's of the points?

3. If X=x1 then the slope would be infinite

4. If Y=y1, then the slope would be 0