DIM CHAP (21, 1) initialization:
Chap (0, 0) = "10,000": chap (0, 1) = 10000 chap (1, 0) = "仟": chap (1, 1) = 1000 CHAP (2, 0) = "": CHAP (2, 1) = 100 CHAP (3, 0) = "Pick up": CHAP (3, 1) = 10 CHAP (4, 0) = "Yuan": CHAP (4, 1) = 1 CHAP (5, 0 = "Angular": chap (5, 1) = 0.1 CHAP (6, 0) = "points": chap (6, 1) = 0.01 chap (11, 0) = "": chap (11, 1) = 1 CHAP (12, 0) = "": chap (12, 1) = 2 chap (13, 0) = "叁": chap (13, 1) = 3 chap (14, 0) = "" : Chap (14, 1) = 4 CHAP (15, 0) = "Wu": CHAP (15, 1) = 5 CHAP (16, 0) = "Lu": CHAP (16, 1) = 6 CHAP (17 , 0) = "柒": chap (17, 1) = 7 CHAP (18, 0) = "捌": chap (18, 1) = 8 CHAP (19, 0) = "玖": chap (19, 1) = 9 CHAP (20, 0) = "zero": CHAP (20, 1) = 0 CHAP (21, 0) = "100 million": chap (21, 1) = 100000000
Function subtochinese (Price as integer) 'Transforming thousands of DIM I as integerim num (15) as integeri = 1 do until price = 0 NUM (i) = int (Price / CHAP (I, 1)) IF Num (i) <> 0 dam (Num (i) 10, 0) & chap (i, 0) Price = price - Num (i) * CHAP (i, 1) else if Subtochinese <> "" and Right (Subtochinese, 1) <> "zero" Then subtochinese = subtochinese & "zero" end if end if i = i 1 loop if right (subtochinese, 1) = "yuan" Then subtochinese = left (SubtoChinese, Len (SubtoChinese) - 1) End ifend function