You for Loop goes out of the index. Do it like this and it should work:
Private Sub btnconfirm_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnconfirm.Click
Dim candidates() As String
ReDim candidates(lstcandidate.Items.Count)
lstcandidate.Items.CopyTo(candidates, 0)
//...