Function StripLastNumberFromString (cinstr as String, lim as integer) as String
dim a as integer
dim curchar as string
dim tempval as string

  for a = 1 to len(cinstr)
    curchar = mid$(cinstr, len(cinstr)-a+1,1)

    if isnumeric(curchar) then
      tempval = curchar + tempval 
    else
      if (tempval <> "") then 
        exit for
      end if
    end if
  next 

  StripLastNumberFromString = cStr(cLng(Right(tempval, lim)))

end Function



Gesponsorde koppelingen