Setting Format for Textbox

M

mrodwell

Hi,
I have only recently started to do userforms etc, and i have come
across a problem with setting a textbox to just take numbers and in a
certain format....for example i have a Value box that only takes
numbers so that the VAT can be worked out seperatly from that figure.
I need the text box to have the numbers formated to 0.00 so it would
be £212.46p do you see.

If any one can help i would be very very grateful.

Mat
 
D

Doug Robbins - Word MVP

Use the format function (probably in the exit event of the textbox)

txtValue = Format(txtValue, "#,##0.00")

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 

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

Top