‘函数,从字符串“ABC123456.78DEF”中取出数据
Function mydata(mystring As String) As Double
Dim i, k As Integer
i = 1
k = Len(mystring)
Do Until Val(Mid(mystring, i, 1)) > 0 Or i > k
i = i + 1
Loop
If i <= k Then
mydata = Val(Right(mystring, Len(mystring) - i + 1))
Else
mydata = 0
End If
End Function