LINQ doesn't work in VBA as far as I know. Seems overkill here anyway when a simple Like operator will work:
You're absolutely right ! Works like a charm. So simple yet so efficient.
Thanks rory !
LINQ doesn't work in VBA as far as I know. Seems overkill here anyway when a simple Like operator will work:
You're absolutely right ! Works like a charm. So simple yet so efficient.
Thanks rory !
Display MoreRe: Check if string contains a number
Here's where a little bit of Linq can make life easier. This will return a boolean telling if there's at least one numeric character in the string.
(from items in inputString.ToCharArray Where Char.IsDigit(items)).Count <> 0
Dave
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 ??