Function IsNumeric(ByVal Str As String ) As Long '指出表达式的运算结果是否为数。
Local I,a,b,c As Long
If Len(str)=0 Then Exit Function
For i=1 To Len(Str)
a=Asc(str,i)
If a=46 Then
b=b+1
If b>1 Then Exit Function
ElseIf a=45 Then
If i<>1 Then Exit Function
ElseIf a<48 Or a>57 Then
Exit For
End If
Next
Function=1
End Function