Formatting Textbox

M

MarkVan

I have a listbox and a few text boxes. When I click on the listbox it fills
in the appropriate fields in the text boxes. I am trying to format the
textbox. One of the fields is a phone number and the other is a date.

I have tried this

format(txtPhone.text, '999-999-9999')
txtDateofBirth.txt

Nothing works. Please advise if this is possible using VBA
 
V

Vasant Nanavati

Something like:

txtPhone.Text = Format(txtPhone.Text, "000-000-0000")
txtDateofBirth.Text = Format(txtDateofBirth.Text,"m/d/yyyy")
 

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