Function CodeNum(ByVal strCode As String) As Integer
Dim intPos As Integer
Dim intNum As Integer
For intPos = 1 To Len(strCode)
intNum = Val(Mid(strCode, intPos))
If intNum = 0 Then
intPos = intPos + 1
Else
Exit For
End If
Next
CodeNum = intNum
End Function
|