Private Sub Command4_Click()
Dim da As String
List1.Clear
da = 100
List1.AddItem da
Do While da < 1000
da = da + 1
List1.AddItem da
Loop
End Sub
'首先是生成出100-1000个数字字符
Private Sub Command2_Click()
Dim a As String
Dim j As Integer
For j = 0 To List1.ListCount - 1
a = List1.List(j)
If val(Mid(a, 1, 1)) < 5 And val(Mid(a, 2, 1)) > 5 And val(Mid(a, 3, 1)) < 5 Then
List3.AddItem a
List1.RemoveItem j
j = j - 1
End If
Next j
end Sub
问题是在红色段代码中,如果把三个字符转换数值,然后全部小于5个话就会提示“实时错误"
但是其他的无论怎么调整大小于5都无问题,只要不要全不小于5就OK了,请问这当中是什么问题呢?
望高首解答!充心感谢!
[此贴子已经被作者于2007-8-26 11:59:18编辑过]