Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Written dollars on a check

Status
Not open for further replies.

vlingen

Programmer
Aug 4, 2006
31
US
Hi All,

I'm working on creating a Check and my issue is on the line where it writes out "Twenty-five dollars" or whatever the amount is. I have the written words, but I need to add the "*****" to fill up the blank space.

I'm missing the function that fills in the "****" for a select number of spaces. The total Length of the line should be 100 characters.

=English(Sum) returns the words that I need.

FoxPro had a function called PADR() which fills in the remaining with whatever character you want... but I don't see this in VBA/Access.
So I'm thinking it should look something like

=English(Sum) + PADR(LEN(English(Sum)) - 100, "*")

so what I need is a way to tell it how many "*" to enter to the right of the "Twenty-five dollars"

Thanks!
 

How about
Code:
MsgBox 100 - Len(English(Sum))
So if "Twenty-five dollars" takes 19 characters, [tt]Len(English(Sum))[/tt] should give you 19.

100 - 19 = 81

You need 81 *'s

Have fun.

---- Andy
 



"...to fill up the blank space"

Be sure to use a FIXED PITCH FONT like Courier

Skip,
[sup][glasses]Don't let the Diatribe...
talk you to death![tongue][/sup][sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top