Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
If TextBox1.Text.Length = 8 Then
TextBox1.Text = Mid(TextBox1.Text, 1, 4) & "-" & Mid(TextBox1.Text, 5, 2) & "-" & Mid(TextBox1.Text, 7, 2)
End If
End Sub