'If i want leading spaces in fixed number format minimum 4 digits with leading spaces up to you to validate number is in range and doesn't get truncated. dim string as string dim num as integer
num = 999
tstr = right(" " & format(num, "#0"),4)