Assume you change the text, and teh value is zero (either because it failed the double.TryParse test last time, of becasu ethe user entered zero.
What value is in Index?
Answer: zero.
So what element are you accessing with this line:
p(Index - 1) = Currenttxtp.Text