大家给看看,为什么不能提取小数
示例.rar
(1.86 KB)
付上源码,请高手给指点下
Private Sub Command1_Click()
Dim a() As String, i As Integer, max As Integer, min As Integer
b = Trim(Text1.Text)
Do Until InStr(b, " ") = 0
b = Replace(b, " ", " ")
Loop
a = Split(b, " ")
max = a(i)
min = a(i)
For i = LBound(a) To UBound(a) 'i = 1 To UBound(a) '
If Trim(a(i)) <> "" Then
If a(i) < min Then min = a(i)
If a(i) > max Then max = a(i)
End If
Next i
Text2 = min
Text3 = max
End Sub
[ 本帖最后由 ankangwr 于 2013-5-10 16:44 编辑 ]