如何用vb删除重复的行,保留非重复的 (求代码)
如何用vb删除重复的行,保留非重复的把这个6c520169011ca300a6c39064b157115f31,2b3169a451a4846c520169011ca30...
如何用vb删除重复的行,保留非重复的
把这个
6c520169011ca300a6c39064
b157115f31,2b3169a451a484
6c520169011ca300a6c39064
0b102e5d3b3567ec102d8a59
d83ffbed102de2bd96058809
b157115f31,2b3169a451a484
942d90d6195f312b3169a537
942d90d6195f312b3169a537
删除重复行后变成这个
6c520169011ca300a6c39064
b157115f31,2b3169a451a484
0b102e5d3b3567ec102d8a59
d83ffbed102de2bd96058809
942d90d6195f312b3169a537 展开
把这个
6c520169011ca300a6c39064
b157115f31,2b3169a451a484
6c520169011ca300a6c39064
0b102e5d3b3567ec102d8a59
d83ffbed102de2bd96058809
b157115f31,2b3169a451a484
942d90d6195f312b3169a537
942d90d6195f312b3169a537
删除重复行后变成这个
6c520169011ca300a6c39064
b157115f31,2b3169a451a484
0b102e5d3b3567ec102d8a59
d83ffbed102de2bd96058809
942d90d6195f312b3169a537 展开
2个回答
展开全部
'加一个文本框,设置为多行,加一个按钮
Private Sub Command1_Click()
Dim myData() As String, a As Integer, myOutput As String
myData = Split(Text1.Text, vbCrLf)
For a = 0 To UBound(myData)
myOutput = myOutput & IIf(InStr(1, myOutput, myData(a)) > 0, "", myData(a) & vbCrLf)
Next
Text1.Text = Text1.Text & vbCrLf & "删除重复行后变成这个" & vbCrLf & myOutput
End Sub
Private Sub Command1_Click()
Dim myData() As String, a As Integer, myOutput As String
myData = Split(Text1.Text, vbCrLf)
For a = 0 To UBound(myData)
myOutput = myOutput & IIf(InStr(1, myOutput, myData(a)) > 0, "", myData(a) & vbCrLf)
Next
Text1.Text = Text1.Text & vbCrLf & "删除重复行后变成这个" & vbCrLf & myOutput
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询