I have an input box that I am using in a macro that
requires the user to input an age between 18 and 65. I
made it so they could only input ages in that range by
using a loop with <>. And that works fine. If they input
15, it just loops.

However, if they accidently try to input anything but a
number (i.e. the letter a) they get a mismatch error. Is
there some way for me to write code that will allow them to
input ONLY numbers. I'm hoping for something similar to
what I've done already (just to loop until they put in a
number between 18 - 65.)

Thanks for looking at this.

Elaine Johnson

Re: Input box. by doj

doj
Wed Jul 02 17:21:04 CDT 2003

use typename(input box value) to ensure the input is an integer

On Wed, 2 Jul 2003 13:45:27 -0700, "Elaine Johnson"
<ejohnson51@cox-internet.com> wrote:

>I have an input box that I am using in a macro that
>requires the user to input an age between 18 and 65. I
>made it so they could only input ages in that range by
>using a loop with <>. And that works fine. If they input
>15, it just loops.
>
>However, if they accidently try to input anything but a
>number (i.e. the letter a) they get a mismatch error. Is
>there some way for me to write code that will allow them to
>input ONLY numbers. I'm hoping for something similar to
>what I've done already (just to loop until they put in a
>number between 18 - 65.)
>
>Thanks for looking at this.
>
>Elaine Johnson