Spline "fitting"

Can you post a more complete macro ?
We cannot run what you sent.