Hello Berry,
there is a missing Exit Function in your function ParseDistanceFile:
' Copy the data into the array. For R = 0 To num_rows If Len(lines(R)) > 0 Then one_line = Split(lines(R), ",") For C = 0 To num_cols data(R, C) = one_line(C) Next C End If Next R ParseDistanceFile = num_rows + 1 Exit Function err_ParseDistanceFile: ReportError MODULE_NAME, "ParseDistanceFile" End Function