Private Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger) If Len(TextBox1) = 2 Or Len(TextBox1) = 6 Then TextBox1.Text = Me.TextBox1 & "." End If If Len(TextBox1) = 10 Then TextBox1.Text = Me.TextBox1 & "/" End If If Len(TextBox1) = 15 Then TextBox1.Text = Me.TextBox1 & "-" End If End Sub