VB text 从第一行到最后一行 ,一行一行的导入List1
1个回答
展开全部
Dim str() As String
Private Sub Command1_Click()
Static row As Integer
Dim i As Integer
If row = 0 Then
str = Split(Text1.Text, vbCrLf)
ElseIf row <= UBound(str) Then
While str(row) = vbCrLf
row = row + 1
Wend
List1.AddItem str(row)
End If
row = row + 1
End Sub
Private Sub Command1_Click()
Static row As Integer
Dim i As Integer
If row = 0 Then
str = Split(Text1.Text, vbCrLf)
ElseIf row <= UBound(str) Then
While str(row) = vbCrLf
row = row + 1
Wend
List1.AddItem str(row)
End If
row = row + 1
End Sub
更多追问追答
追问
代码不管用
追答
我试过可以,这个行是以文本中的回车来确定的,不是文本框自动换行的那个行。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询