The problem is you are using absoulte numbers for the textboxes but index offsets for the remove at.
i.e
After adding 3 items the array contains 3 items (0,1,2)
If you remove the item from ICD9Code1 then the ArrayList contains 2 items (0,1).
If you try to delete ICD9Code2 the aryDiagnosis.RemoveAt(i) is trying to remove item 2 but only 0 & 1 are present - hence the error.
You may be better trying to remove them by name rather than the number i.
If I get chance I'll have a look at the code later today and see what I can do...