Text string to a number

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

The following function returns a text..but i want to get it as a number:

Public Function Gmid(vin)
If Mid(vin, 12, 1) < "A" And Mid(vin, 12, 1) > 0 Then
ID = Right(vin, 6)
Else
ID = Right(vin, 5)
End If
Gmid = ID
End Function

Thanks in advance x your help!

AhsMorK (chile)
 
Public Function Gmid(vin) As Long
_______________________________________________________________________
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top