Unfortunately, you'll get false positives with that approach, since, for
example, IsNumeric("1E2") returns True (Access assumes the E is an exponent,
so that that equals 100)
You may want to use
If Str(Val(strTestString(I))) = strTestString(I) Then
MsgBox "Token number " & I & " is numeric."
End If
"Bill" wrote in message
news:(E-Mail Removed)...
You could do something like:
Option Compare Database
Option Explicit
Private Sub TestSub()
Dim strTestString() As String
Dim strMyString As String
Dim I As Integer
strMyString = "NECO 101880 941 NECO KOZIJNEN"
strTestString = Split(strMyString, " ")
For I = 0 To UBound(strTestString)
If IsNumeric(strTestString(I)) Then
MsgBox "Token number " & I & " is numeric."
End If
Next
End Sub
"Erwin Bormans" <(E-Mail Removed)> wrote in message
news:%ckip.80037$(E-Mail Removed)2...
> Dear,
>
> I've got a string for example:
>
> "NECO 101880 941 NECO KOZIJNEN"
>
> This string is never the same, but i need the 101880 nr.
>
> Is there a way i can check wether a karakter in that string is a number or
> not?
>
> Thanks in advance,
> Kind regards,
> Erwin
|