Formatting a textbox

A

Albert

Hi Guys,

Just a quick question.

How do I format a textbox value when a user enters the textbox?

Private Sub TextBoxCustcontactnmbr_Enter()
TextBoxCustcontactnmbr.Text = Format(TextBoxCustcontactnmbr.Text,
"###-###-####")
End Sub

I want the number to appear 999-999-9999

Thanks
Albert
 
P

Per Jessen

Hi Albert

I am not sure what you want to do, but I think that I would format the
textbox when the user leaves it.

I.e.
Privat sub Textbox1_exit()
.....

Regards,

Per
 

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