Str(xha[1], 5, 3) – Stringify a numeric to any precision. First number (5) is the total field width in characters, including the decimal. Second number (3), is the number of decimal places to display to the right . So if xha[1] was 123.456, and you wrote Str(xha[1], 6, 2), you would get “123.46”