Textbox value

R

ranswrt

I have a textbox on a userform to input dates. How do I format the textbox
to only accept dates in the form of mm/dd/yy?
Thanks
 
O

Office_Novice

Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox1.Value = Format(TextBox1.Value, "mm/dd/yy")
End Sub
 
R

ranswrt

Works great
Thanks

Office_Novice said:
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox1.Value = Format(TextBox1.Value, "mm/dd/yy")
End Sub
 

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