I have an Inputbox to seek input from the user, being the letters of any single hidden column that the user wishes to unhide.
However, I want to build in some error handlers to deal with "invalid input", viz; more than two letters & non-alpha characters (#,%,&, etc), numbers.
I have got the first test (> 2 chars) covered
I'm not too bothered about the second, but
I'm having trouble detecting the third (numbers) because InputBox returns a string - which by definition is text!!
How can I include the test:
If InputBoxString = numbers, then MsgBox = "Invalid input"?
(Alternatively, is there a test I can use to detect both tests 2 & 3 as "non-text")
I tried worksheet functions IsNontext & IsNumber - but they don't work because the string (even if it looks like a number) is still text.
Thanks in advance
However, I want to build in some error handlers to deal with "invalid input", viz; more than two letters & non-alpha characters (#,%,&, etc), numbers.
I have got the first test (> 2 chars) covered
I'm not too bothered about the second, but
I'm having trouble detecting the third (numbers) because InputBox returns a string - which by definition is text!!
How can I include the test:
If InputBoxString = numbers, then MsgBox = "Invalid input"?
(Alternatively, is there a test I can use to detect both tests 2 & 3 as "non-text")
I tried worksheet functions IsNontext & IsNumber - but they don't work because the string (even if it looks like a number) is still text.
Thanks in advance