|
Sub 乱序中取数字2()
Dim i%, str$, s%, strr$, w As Single
str = "我10你们2.2他30"
i = Len(str)
For s = 1 To i
If Val(Mid(str, s, 1)) > 0 Or Mid(str, s, 1) = "." Or Mid(str, s, 1) = 0 Then
strr = strr & Mid(str, s, 1)
Else
strr = strr & "+"
End If
Next
w = Evaluate(strr)
MsgBox w
End Sub |
评分
-
查看全部评分
|