: : Hay Guys,
: : I need help with something. I need to find a number with in a string. Now this number may be double digits and changes all the time. I want to extract the number from the string.
: :
: : Any Ideas?
: :
: :
: : Thanks,
: : DrKajun
: :
: :
:
: Hi,
: Try something like this:
:
:
:
: Private Function ExtNum(ByVal strValue As String) As Integer
: Dim strNum As Integer
: Dim i As Integer
:
: On Error Resume Next
:
: For i = 1 To Len(strValue)
: If IsNumeric(Mid(strValue, i, 1)) Then strNum = strNum & Mid(strValue, i, 1)
: Next i
:
: ExtNum = CInt(strNum)
: End Function
:
:
:
:
:
:
//MicroDot
:
:
Sorry for being so veag, I know what I want to do but it's hard to explain.
MicroDot, I think you may have give'in me a way to pull off my task. The "IsNumeric" function may allow me to put to geather some logic to find the number with in my string. Learn somthing new everyday.
THANKS GUYS! I'll keep you posted.
DrKajun