Hello,
You can use this code
http://www.codeproject.com/KB/vbscript/CurrencyToWord.aspx
Or you can simply go backward using following logic
Divide your maximum value, like if it is Trillion than divide your number by 1012 and than divide it with 109 and down to division with 1 or to decimal points if you need. if will be simple recursive sort of method.
Hope that help or let me know to give you complete source code for it.