Mark's answer was a different way to solve the problem. Getting back to your question, you were doing things exactly right, only you were looking at the contents of the number variable, the formatting only happens when it's used as a string. Try this in the multiline message box: set the numberFormat to "000" put (1 + 0) into paddedNumber put paddedNumber