,如
456
789
123
223
556
488  运行时,这里只删除223,556,488这样的重复性的数据,该怎么做呢?         

解决方案 »

  1.   


    Option ExplicitPrivate Sub Command1_Click()
      MsgBox IsSame("1233") '如果相同就返回True 不重复返回False .
      '你自己一个一个的进行对比,相同就删除.
    End Sub
    Private Function IsSame(ByVal String1 As String) As Boolean
       Dim i As Long
       
       IsSame = False
       
       For i = 1 To Len(String1) - 1
         If InStr(i + 1, String1, Mid(String1, i, 1)) > 0 Then
            IsSame = True
            Exit Function
         End If
       Next
    End Function
      

  2.   

    随手写的 没有调试过dim a ,b,c
    for i=listview1.listitem.count to 1 setp -1
     a=mid(listview1.listitem(i).text,1,1)
     b=mid(listview1.listitem(i).text,2,1)
     c=mid(listview1.listitem(i).text,3,1)
     if  a=b or a=c or b=c  then listview1.listitem.remove i 
    next