I found most of this code on the Internet. I tweaked it to this little function.
Public Function GetNextPriKeyID(ByVal dt As DataTable) As Int32
Dim maxNum As Int32 = (From n In dt _
Select n.Field(Of Int32)(0)).Max()
maxNum += 1
Return maxNum
End Function