L lpaul Active member Joined Dec 7, 2005 Messages 27 Programming Experience Beginner Feb 1, 2006 #1 How would convert to vb.net ?? It is probably simple but I' can't figure out EmpID = Val(Trim(Right(FEmpID, Len(FEmpID) - 1)))
How would convert to vb.net ?? It is probably simple but I' can't figure out EmpID = Val(Trim(Right(FEmpID, Len(FEmpID) - 1)))
T TechGnome Well-known member Joined May 23, 2005 Messages 896 Programming Experience 10+ Feb 1, 2006 #2 Assuming EmpID is an integer: EmpId = System.Int32.Parse(FEmpID.Substring(1, FEmpID.Length - 1).Trim) -tg Upvote 0 Downvote
Assuming EmpID is an integer: EmpId = System.Int32.Parse(FEmpID.Substring(1, FEmpID.Length - 1).Trim) -tg
L lpaul Active member Joined Dec 7, 2005 Messages 27 Programming Experience Beginner Feb 2, 2006 #3 I have : Dim FJobID as String Dim JobId as Integer JobID = 0 Then your code but I am getting an error on your line that says the "Length cannot be less than zero." Upvote 0 Downvote
I have : Dim FJobID as String Dim JobId as Integer JobID = 0 Then your code but I am getting an error on your line that says the "Length cannot be less than zero."
T TechGnome Well-known member Joined May 23, 2005 Messages 896 Programming Experience 10+ Feb 2, 2006 #4 That would only happen if FEmpID was empty.... so check it's length first, make sure there's something there first. -tg Upvote 0 Downvote
That would only happen if FEmpID was empty.... so check it's length first, make sure there's something there first. -tg