當前位置:成語大全網 - 新華字典 - VB6.0關於去除重復數據的問題

VB6.0關於去除重復數據的問題

'加壹個文本框,把原始數據輸入文本框中

Private Sub Command1_Click()

Dim a As Integer, myTempStr As String, myOutput As String

For a = 1 To Len(Text1.Text)

myTempStr = Mid(Text1.Text, a, 1)

If InStr(1, myOutput, myTempStr) = 0 Then myOutput = myOutput & myTempStr

Next

MsgBox myOutput

End Sub