I need help with determing the content of a string, I need to know if it contains text or numbers. I know that there is probably some simple way to do this but my VB is a bit rusty.
Printable View
I need help with determing the content of a string, I need to know if it contains text or numbers. I know that there is probably some simple way to do this but my VB is a bit rusty.
Let's assume that you have a TextBox. To see if it holds number, you can use IsNumeric function.
Code:If IsNumeric(Text1) Then
'It has numbers
Else
'It has string
End If
Thanks, that one's been bugging me for a while.