target.IsNumeric
Description
Description
Checks if the value passed to the function is Numeric.
Syntax
Syntax
Function IsNumeric(value)
Parameters
Parameters
variant value - a value to be checked.
Return value
Return value
boolean - true: the value is numeric, false otherwise
Example
Sample code
Function SetByTagNum( i, s, t1, t2 )
Dim p1, p2, d, r, c
r = Empty
d = Len(t1)
p1 = InStr(1, s, t1, 1) + d
If d = 0 Then p1 = 1
If p1 > d Then
r = Trim(Mid(s, p1))
If Len(t2) > 0 Then
p2 = InStr(1, r, t2, 1)
If p2 > 0 Then r = Trim(Left(r, p2 - 1))
End If
If Len(r) > 0 Then
if Target.IsEmpty(v(i)) Then
v(i) = r
ElseIf IsNumeric(v(i)) Then
v(i) = ChNum(v(i)) + ChNum(r)
End If
End If
End If
End Function
See also