textbox format

R

Rook

Is it possible to format the text, eg. date (mm-dd-yyyy), in textbox of
control toolbox?
 
B

Bob Phillips

You can use

With Me.TextBox1
If IsDate(.Text) Then .Text = Format(.Text, "mm-dd-yyyy")
End With


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
R

Rook

Will I put this in the code?
Thanks

Rook


Bob Phillips said:
You can use

With Me.TextBox1
If IsDate(.Text) Then .Text = Format(.Text, "mm-dd-yyyy")
End With


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
B

Bob Phillips

That depends upon your design, where you want the date formatted.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
Top