vb文本框数组问题 文本框1有1 2 3 4 5 文本框2有2 3 4
展开全部
Private Sub Command1_Click()
Dim a1() As String, a2() As String, a3() As String, a4() As String
Dim i As Integer, j As Integer
a1 = Split(Text1.Text, " ")
a2 = Split(Text2.Text, vbCrLf)
For i = 0 To UBound(a2)
a3 = Split(a2(i), " ")
If UBound(a3) >= 0 Then
a4 = Filter(a1, a3(0), False)
For j = 1 To UBound(a3)
a4 = Filter(a4, a3(j), False)
Next
a2(i) = Join(a4, " ")
End If
Next
Text3.Text = Join(a2, vbCrLf)
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询