If myTable.Rows.Count = 0 Then
Else
'Try
For Each myDataRow As DataRow In dTable.Rows
For myArraySearch As Integer = 0 To 50 Step 1
dTable.Rows.RemoveAt(dTable.Rows.IndexOf(dTable.Rows.Find(myArray(myArraySearch))))
Next
Next
'Catch ex As Exception
'End Try
End If
When I remove the try catch statement I get the error "There is no row at position -1.". Is there a way to contain this error without having to use the try catch statement.

New Topic/Question
Reply




MultiQuote





|