need some macro help

M

Mike

I have a template that a user can enter a dollar amount or percent. I want
the default to be a dollar amount but also except percents. The field does
not need to do a calculation.
How can i have the field default to dollar amount $ but also except a
percentage? %

I never written a macro or done any VBA in word what so ever, so i need some
help on this.

thx.
 
W

Word Heretic

G'day "Mike" <[email protected]>,

a) use a std text field.

b) validate the text field by setting the OnExit macro of the field to
a suitable macro

c) a suitable macro would then

fail on a non-numeric being presented (excepting $, . and %)
check for a % sign, if none then hard format to 2d prefixed with a
dollar sign

Steve Hudson
Word Heretic Sydney Australia
Tricky stuff with Word or words

Email: WordHeretic at tpg.com.au


Mike was spinning this yarn:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top