-
checking data types
Yo, I'm wondering if anyone knows a function I can use to check whether a certain variable has been returned as an integer or a string. For example, say you have a text box getting input from the user and the user enters both words and numbers into the box. If you are assigning this input to variables, how can you check what type the data is so you dont assign a string to an integer variable and get a runtime error? If anyone knows, I'm awaiting the answer. Thanks,
-
Well
Isnumeric(Me.text1.text)
If true = valid number was entered
If false, two possible reasons,
1) No entry (len(text1.text)=0)
2) string was entered...
Will this work for ya?
-
Thanks man, thats exactly what i needed
-
Well