-2
我需要删除最后一行richtextbox。我尝试了几种方法。但没有任何工作。请人帮我删除richtextbox的最后一行
For t = Len(texto) To 0 Step -1
If Mid(texto, t, 1) = vbCr Then
c = c + 1
'texto = Mid(texto, 1, t - 1) don't
End If
'
If c = 2 Then Exit For
Next
RichTextBox2.Text = Left$(texto, t - 1)
添加你已经尝试了什么,添加相关标签 – sinhayash
显示你已经尝试过什么,并描述它是如何未能按预期运行。 – Filburt
For t = Len(texto)To 0 Step -1 If Mid(texto,t,1)= vbCr Then c = c + 1 'texto = Mid(texto,1,t - 1)do end如果 ' 如果C = 2然后退出对于 接着 RichTextBox2.Text =左$(texto,叔 - 1) –