Convert.ToInt64 (Object) converts object to a 64-bit signed integer.
Module Example Public Sub Main() Dim values() As Object = { True, -12, 123, 935, "x"c, "1.00e2", "One", 1.00e2, 16.3e42} Dim result As Long For Each value As Object In values Try result = Convert.ToInt64(value) Console.WriteLine(result) Catch e As Exception Console.WriteLine("Exception") End Try Next End Sub End Module