VB6 to vb.net conversion

lpaul

Active member
Joined
Dec 7, 2005
Messages
27
Programming Experience
Beginner
How would convert to vb.net ?? It is probably simple but I' can't figure out

EmpID = Val(Trim(Right(FEmpID, Len(FEmpID) - 1)))
 
Assuming EmpID is an integer:

EmpId = System.Int32.Parse(FEmpID.Substring(1, FEmpID.Length - 1).Trim)

-tg
 
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."
 
That would only happen if FEmpID was empty.... so check it's length first, make sure there's something there first.

-tg
 
Back
Top