Private Sub TextBox1_Change()
Dim max
max = 50
If Len(TextBox1.Value) > max Then TextBox1.Value = Left(TextBox1.Value, max)
End Sub