'This is based on the Java source code changed on 9CBS' enjoy it public function old2new (byval Oldid as string) AS String Dim w () AS INT16 = {7, 9, 10, 5, 8, 4, 2, 1 , 6, 3, 7, 9, 10, 5, 5, 4, 2, 1} DIM A () AS String = {"1", "0", "X", "9", "8", " 7 "," 6 "," 5 "," 4 "," 3 "," 2 "} DIM I as int32 = 0, S as int32 = 0 DIM newid AS String newid = Oldid newid = newid.substring (0, 6) "19" newid.substring (6, oldid.Length () - 6) for i = 0 to newid.length - 1 s = convert.Toint32 (Newid.Substring (i, 1)) * w ( I) Next S = S mod 11 newid = newid a (s) return newid end function