I hope this can help you:
Sub IntersectAndExportToExcel()
Dim lineWHITE As AcadLine, lineCOLOR As AcadLine
Dim intPoints As Variant, pt As Variant, filterData(0) As Variant
Dim answer As String
Dim ss As AcadSelectionSet
Dim filterType(0) As Integer
Dim ent As AcadEntity
' Create an instance of Excel
Dim xlApp As Object
Set xlApp = CreateObject("Excel.Application")
' Open a new Excel workbook
Dim xlWorkbook As Object
Set xlWorkbook = xlApp.Workbooks.Add
' Select the first Excel sheet
Dim xlSheet As Object
Set xlSheet = xlWorkbook.Sheets(1)
' Initial row to write data in Excel
Dim rowNum As Integer
rowNum = 1
answer = "TRUE"
Do While UCase(answer) = "TRUE"
ThisDrawing.Utility.GetEntity lineCOLOR, pt, "Select a line of color"
filterType(0) = 0: filterData(0) = "line"
Set ss = ThisDrawing.SelectionSets.Add("sl")
ss.SelectOnScreen filterType, filterData
For Each ent In ss
If TypeOf ent Is AcadLine Then
Set lineWHITE = ent
intPoints = lineCOLOR.IntersectWith(lineWHITE, acExtendNone)
xlSheet.Cells(rowNum, 1).Value = Round(intPoints(0), 3)
xlSheet.Cells(rowNum, 2).Value = Round(intPoints(1), 3)
rowNum = rowNum + 1
End If
Next ent
ss.Delete
answer = UCase(InputBox("Continue? (TRUE/FALSE)", , "TRUE"))
Loop
' Save the Excel workbook to a file
xlWorkbook.SaveAs "Path/to/save/the/file.xlsx"
' Close Excel
xlApp.Quit
' Release Excel resources
Set xlSheet = Nothing
Set xlWorkbook = Nothing
Set xlApp = Nothing
End Sub
jefferson