Private Sub TextBox1_Change()
If Len(TextBox1) = 2 Or Len(TextBox1) = 5 Then TextBox1 = TextBox1 & "/"
End Sub
Private Sub TextBox2_Change()
If Len(TextBox2) = 2 Or Len(TextBox2) = 5 Then TextBox2 = TextBox2 & "/"
End Sub
Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
MsgBox KeyCode
Select Case KeyCode
Case 8
If Len(TextBox1) = 3 Or Len(TextBox1) = 6 Then TextBox1 = Left(TextBox1, Len(TextBox1) - 2)
Exit Sub
Case 9, 13, 16, 17, 27, 36 To 41, 46
Exit Sub
Case Is > 57, Is < 48
KeyCode = 0
End Select
End Sub