求助 如何将不同文本框内的数据不重复的按大下排到一个新框内?
求助 如何将不同文本框内的数据不重复的按大下排到一个新框内?见图;[此贴子已经被作者于2018-2-7 19:43编辑过]
Private Sub Command1_Click() Text1.Text = "" K = 0 For I = 0 To 4 If Check1(I).Value <> 0 Then K = K + 1 AA(K) = Check1(I).Caption End If If Check2(I).Value <> 0 Then K = K + 1 AA(K) = Check2(I).Caption End If Next I For I = 0 To 3 If Check3(I).Value <> 0 Then K = K + 1 AA(K) = Check3(I).Caption End If If Check4(I).Value <> 0 Then K = K + 1 AA(K) = Check4(I).Caption End If If Check5(I).Value <> 0 Then K = K + 1 AA(K) = Check5(I).Caption End If Next I Dim SSA As String For I = 1 To K - 1 For J = I + 1 To K If AA(I) > AA(J) Then SSA = AA(I) AA(I) = AA(J) AA(J) = SSA End If Next J Next I For I = 1 To K If I < K Then Text1.Text = Text1.Text & AA(I) & " - " Else Text1.Text = Text1.Text & AA(I) End If Next I End Sub
[此贴子已经被作者于2018-2-14 09:53编辑过]
For I = 0 To 6 If Check1(I).Value <> 0 Then K = K + 1 AA(K) = Check1(I).Caption End If If Check2(I).Value <> 0 Then K = K + 1 AA(K) = Check2(I).Caption End If Next I '修改为 For I = 0 To 6 If Text1(I).Text <> "" Then K = K + 1 AA(K) = Text1(I).Text End If Next I
[此贴子已经被作者于2018-2-16 15:00编辑过]