هذا الكود يحذف ما قبل اخر 16 سطر من اسطر TextBox
With TextBox1
If .Lines.Count > 16 Then
.Text = .Text.Substring(.Text.IndexOf(vbCrLf) + Len(vbCrLf))
.SelectionStart = .Text.Length
End If
End With
نسيت ان اذكر ان تضع الكود في الحدث TextChenged لمربع النص
With TextBox1
If .Lines.Count > 16 Then
.Text = .Text.Substring(.Text.IndexOf(vbCrLf) + Len(vbCrLf))
.SelectionStart = .Text.Length
End If
End With
نسيت ان اذكر ان تضع الكود في الحدث TextChenged لمربع النص
