ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Textbox value (https://www.excelbanter.com/excel-programming/414609-textbox-value.html)

ranswrt

Textbox value
 
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

Office_Novice

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

"ranswrt" wrote:

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


ranswrt

Textbox value
 
Works great
Thanks

"Office_Novice" wrote:

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

"ranswrt" wrote:

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



All times are GMT +1. The time now is 12:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com