Thanks for your advise. I think now I read IJK variables. The problem now is here:
ChainAnalysis iLigne, X, Y, Z, I, J, K, iValid
iLigne = iLigne + 1
The function ChainAnalysis do not works properly and my code stops here. I attach again my xls with the modifications I have done.
Thanks for...