Please help, what do i add to my code so it displays the message only after 4 digits are entered in the text box. At the moment it pops up after one keystroke.
Private Sub txtYear_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtYear.TextChanged
Dim Year As Integer
Year = txtYear.Text
If Year < 1900 Or Year > 2100 Then MsgBox(" Please enter a year between 1900 and 2100 ")
kind regards