I have several lines containing, say, three concatenated strings. Each of the concatenated strings will have varying lengths like:
Cyberdude......Millie Hill......CA
MyMothaw.......Houston[col.TX
Son................San Jose......CA
I would like to Msgbox a list of these strings so that their first characters are aligned like in the example above. Since the characters are variable length, it?s an exercise in futility to try to insert blanks to make them align. I?ve tried using the SPACE(nnn) function by making the argument a litle more complicated:
SPACE(12 - 1.8 * LEN(?Cyberdude?))
This assumes that I want the first column to be nominally 12 ?characters? wide, so I try to get an equivalent width of the ?space? character that must be appended to each constant in order to fill out 12 characters. In the example above I have determined by experimenting that I need 1.8 equivalent spaces to match the average width of each Cyberdude character. This technique has some merit with a constant like ?Cyberdude?, but when I get a constant with a lot of narrow characters like ?Millie Hill?, then the equivalent space must be much larger. A constant like ?MyMothaw? has more wide characters, so the equivalent space must be smaller.
I need a function similar to LEN that can provide me with an equivalent SPACE width for the specified constant. It would be nice to have the specification in the form of a multiplier like the 1.8 that I used above, but maybe it has to be specifed in pixels or some such thing.
Keep in mind that I want to use this in a Msgbox output where I have no control over the font used for the constants.
Has anyone come to grips with this problem and solved it?