Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
TextBox that only accepts integers?
What would be the best way to check that text is a positive whole
number? I'm thinking about putting it in the textbox_exit event. *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
TextBox that only accepts integers?
Hi
Exit is too late. Use the Keypress event. Set keyascii to 0 if its < 48 or 57. Except (tricky part coming up): Keydown event to trap and validate Ctrl V. HTH. Best wishes Harald "Claud Balls" skrev i melding ... What would be the best way to check that text is a positive whole number? I'm thinking about putting it in the textbox_exit event. *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
TextBox that only accepts integers?
You can validate the contents of the textbox using the isnumeric function.
You will also have to look for "-" and "." using the instr function. "Claud Balls" wrote: What would be the best way to check that text is a positive whole number? I'm thinking about putting it in the textbox_exit event. *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Function that accepts and returns a decimal, is it possible? | Excel Worksheet Functions | |||
How to auto-return to next cell that accepts data. | Excel Worksheet Functions | |||
A list of Consecutive Integers, can I search for missing integers | Excel Worksheet Functions | |||
Sheet Name not accepts special characters | Excel Programming | |||
Forcing Integers into Textbox | Excel Programming |