Your problem is that the multivalue parameter value collection is zero-based, not one-based. That is, the first item in the array is index 0
and the last is Count - 1
. Consequently For index As Integer = 1 To numPledges
throws an array out of bounds error.
You need to use:
For index As Integer = 0 To numPledges - 1
As an aside, Count
is a property not a method so it should not have the brackets after it.