VB如何提取文本框指定多行文字?
发布网友
发布时间:2022-05-07 13:22
我来回答
共1个回答
热心网友
时间:2023-11-01 18:00
Function getline(ByVal s As String, ParamArray a())
Dim i As Integer, st(1 To 1000) As String, s1 As String, s2 As String, rnum As Integer, v
s1 = ""
rnum = 0
For i = 1 To Len(s)
If Mid(s, i, 1) <> Chr(13) Then
s1 = s1 + Mid(s, i, 1)
Else
rnum = rnum + 1
st(rnum) = s1
s1 = ""
End If
Next i
rnum = rnum + 1
st(rnum) = s1
s1 = ""
For Each v In a
s1 = s1 + st(v)
Next v
getline = s1
End Function
Private Sub Command1_Click()
Text2 = getline(Text1, 1, 3, 5)
End Sub
热心网友
时间:2023-11-01 18:00
Function getline(ByVal s As String, ParamArray a())
Dim i As Integer, st(1 To 1000) As String, s1 As String, s2 As String, rnum As Integer, v
s1 = ""
rnum = 0
For i = 1 To Len(s)
If Mid(s, i, 1) <> Chr(13) Then
s1 = s1 + Mid(s, i, 1)
Else
rnum = rnum + 1
st(rnum) = s1
s1 = ""
End If
Next i
rnum = rnum + 1
st(rnum) = s1
s1 = ""
For Each v In a
s1 = s1 + st(v)
Next v
getline = s1
End Function
Private Sub Command1_Click()
Text2 = getline(Text1, 1, 3, 5)
End Sub
热心网友
时间:2023-11-01 18:00
Function getline(ByVal s As String, ParamArray a())
Dim i As Integer, st(1 To 1000) As String, s1 As String, s2 As String, rnum As Integer, v
s1 = ""
rnum = 0
For i = 1 To Len(s)
If Mid(s, i, 1) <> Chr(13) Then
s1 = s1 + Mid(s, i, 1)
Else
rnum = rnum + 1
st(rnum) = s1
s1 = ""
End If
Next i
rnum = rnum + 1
st(rnum) = s1
s1 = ""
For Each v In a
s1 = s1 + st(v)
Next v
getline = s1
End Function
Private Sub Command1_Click()
Text2 = getline(Text1, 1, 3, 5)
End Sub
热心网友
时间:2023-11-01 18:00
Function getline(ByVal s As String, ParamArray a())
Dim i As Integer, st(1 To 1000) As String, s1 As String, s2 As String, rnum As Integer, v
s1 = ""
rnum = 0
For i = 1 To Len(s)
If Mid(s, i, 1) <> Chr(13) Then
s1 = s1 + Mid(s, i, 1)
Else
rnum = rnum + 1
st(rnum) = s1
s1 = ""
End If
Next i
rnum = rnum + 1
st(rnum) = s1
s1 = ""
For Each v In a
s1 = s1 + st(v)
Next v
getline = s1
End Function
Private Sub Command1_Click()
Text2 = getline(Text1, 1, 3, 5)
End Sub
热心网友
时间:2023-11-01 18:00
Function getline(ByVal s As String, ParamArray a())
Dim i As Integer, st(1 To 1000) As String, s1 As String, s2 As String, rnum As Integer, v
s1 = ""
rnum = 0
For i = 1 To Len(s)
If Mid(s, i, 1) <> Chr(13) Then
s1 = s1 + Mid(s, i, 1)
Else
rnum = rnum + 1
st(rnum) = s1
s1 = ""
End If
Next i
rnum = rnum + 1
st(rnum) = s1
s1 = ""
For Each v In a
s1 = s1 + st(v)
Next v
getline = s1
End Function
Private Sub Command1_Click()
Text2 = getline(Text1, 1, 3, 5)
End Sub
热心网友
时间:2023-11-01 18:00
Function getline(ByVal s As String, ParamArray a())
Dim i As Integer, st(1 To 1000) As String, s1 As String, s2 As String, rnum As Integer, v
s1 = ""
rnum = 0
For i = 1 To Len(s)
If Mid(s, i, 1) <> Chr(13) Then
s1 = s1 + Mid(s, i, 1)
Else
rnum = rnum + 1
st(rnum) = s1
s1 = ""
End If
Next i
rnum = rnum + 1
st(rnum) = s1
s1 = ""
For Each v In a
s1 = s1 + st(v)
Next v
getline = s1
End Function
Private Sub Command1_Click()
Text2 = getline(Text1, 1, 3, 5)
End Sub
热心网友
时间:2023-11-01 18:01
Function getline(ByVal s As String, ParamArray a())
Dim i As Integer, st(1 To 1000) As String, s1 As String, s2 As String, rnum As Integer, v
s1 = ""
rnum = 0
For i = 1 To Len(s)
If Mid(s, i, 1) <> Chr(13) Then
s1 = s1 + Mid(s, i, 1)
Else
rnum = rnum + 1
st(rnum) = s1
s1 = ""
End If
Next i
rnum = rnum + 1
st(rnum) = s1
s1 = ""
For Each v In a
s1 = s1 + st(v)
Next v
getline = s1
End Function
Private Sub Command1_Click()
Text2 = getline(Text1, 1, 3, 5)
End Sub
热心网友
时间:2023-11-01 18:00
Function getline(ByVal s As String, ParamArray a())
Dim i As Integer, st(1 To 1000) As String, s1 As String, s2 As String, rnum As Integer, v
s1 = ""
rnum = 0
For i = 1 To Len(s)
If Mid(s, i, 1) <> Chr(13) Then
s1 = s1 + Mid(s, i, 1)
Else
rnum = rnum + 1
st(rnum) = s1
s1 = ""
End If
Next i
rnum = rnum + 1
st(rnum) = s1
s1 = ""
For Each v In a
s1 = s1 + st(v)
Next v
getline = s1
End Function
Private Sub Command1_Click()
Text2 = getline(Text1, 1, 3, 5)
End Sub