Converting numeric dollar amounts into text
By: Jim Pinery Date: 24/09/1998
File:

dollarstotext.zip

Size:

982 bytes

Download now!

This code will convert a numeric dollar amount into text for use in such applications as printing a check.

This code assumes that the input will be in a valid numeric format. So, either check the data before this routine begins, or put some kind of error handling in it. Also, it has an upper limit of $999,999.99. This should more properly be handled outside of this routine before an amount is ever passed to it.

Syntax

DollarsToText(dollars$)

Parameters

dollars: a string with the numerical value to be converted

Type of data

String

Returns

The dollars converted into text

-

For example $27,542.50 will be converted to Twenty Seven Thousand Five Hundred Forty Two and 50/100.

The function is contained in a module. You can cut and paste it in any program of yours.

Click Here!


Visual Basic Programming Zone is a website by Lorenzo Dalla Vecchia.
Webmaster's e-mail: webmaster@vbprogzone.cjb.net
Hosted by InWind: www.inwind.it