Formatting a Textbox
Posted on 2006-10-27
I have a textbox on my form and I would like the user to enter 4 numbers into it and have the textbox automatically format it to xx/xx as they are typing. I have tried using the below code but when I do once the first two numbers have been typed the cursor is moved back to the start of the box rather than after the "/"
If txtboxExp.Text.Length = 2 Then
txtboxExp.Text = txtboxExp.Text & "/"
Can someone let me know and easy way of creating a custom format for a textbox like this.