VB/VBS怎么判断数字重复?
答案:1 悬赏:60 手机版
解决时间 2021-03-22 14:39
- 提问者网友:难遇难求
- 2021-03-22 05:40
VB/VBS怎么判断数字重复?
最佳答案
- 五星知识达人网友:罪歌
- 2021-03-22 07:17
Private Sub Command1_Click()
Dim numS(3) As Integer, XXX() As Integer, i As Integer, k As Integer, myTempStr As String
numS(0) = 123
numS(1) = 456
numS(2) = 456
numS(3) = 123
For i = 0 To UBound(numS)
If InStr(1, myTempStr, numS(i)) = 0 Then
myTempStr = myTempStr & vbCrLf & numS(i)
ReDim Preserve XXX(k)
XXX(k) = numS(i)
k = k + 1
End If
Next
End Sub
Dim numS(3) As Integer, XXX() As Integer, i As Integer, k As Integer, myTempStr As String
numS(0) = 123
numS(1) = 456
numS(2) = 456
numS(3) = 123
For i = 0 To UBound(numS)
If InStr(1, myTempStr, numS(i)) = 0 Then
myTempStr = myTempStr & vbCrLf & numS(i)
ReDim Preserve XXX(k)
XXX(k) = numS(i)
k = k + 1
End If
Next
End Sub
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯