Posts by bringbackthedog

    LINQ doesn't work in VBA as far as I know. Seems overkill here anyway when a simple Like operator will work:


    Code
    Function HasNumber(sIn As String) As Boolean
    HasNumber = sIn Like "*#*"
    End Function
    Function HasNumberOtherThanZero(sIn As String) As Boolean
    HasNumberOtherThanZero = sIn Like "*[1-9]*"
    End Function


    You're absolutely right ! Works like a charm. So simple yet so efficient.


    Thanks rory !


    Hi Dave, I hope you get this... 7 years later


    Could you elaborate on how your code is supposed to work? I can't seem to make it work?



    from items in inputString.ToCharArray WhereChar.IsDigit(items)).Count <> 0


    how do i write this?


    ie: x = from items in inputString.ToCharArray WhereChar.IsDigit(items)).Count <> 0 ??