不知道理解是否正确,不过按照你的想法,当选择chk(0)的时候会显示000和111,并不仅是000,下面代码我已验证。
Dim a As String, b() As String, i As Integer, j As Integer, max As Integer, min As Integer, chek As CheckBox
b = Split(Trim(txtjg), " ")
a = ""
For i = 0 To UBound(b)
If b(i) <> "" Then
max = -1
min = 10
For j = 1 To 3
'找到最大数放到max中,最小数放到min中
If Val(Mid(b(i), j, 1)) > max Then max = Val(Mid(b(i), j, 1))
If min > Val(Mid(b(i), j, 1)) Then min = Val(Mid(b(i), j, 1))
Next
For Each chek In chkkd
If chek.Value = 1 Then If Val(chek.Caption) = max - min Then a = a & b(i) & " "
Next
End If
Next
txtjg= a