For i = 1 to Len(FolderName)
If asc(i) <= 48 AND asc(i) >= 57 Then 'its not a number
strCustNum = strCustID & i
Else
exit for 'as soon as it finds a non alpha character is exits
End If
Next
Function GetCustNum(FileName)
tmp=FileName
For i=1 To Len(tmp)-3
x=Left(tmp,1)
If x>="0" Or x<="9" Then Exit For
tmp=Mid(tmp,2)
Next
GetCustNum=CLng(tmp)
End Function
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.