ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Integer only textbox? (https://www.excelbanter.com/excel-programming/369124-integer-only-textbox.html)

[email protected]

Integer only textbox?
 
Can I set a textbox (on a form) to accept only integer values? If so
how?
TIA


ImpulseBlue

Integer only textbox?
 
Create an _AfterUpdate() routine for your text box and then check if
its an integer in your code.



wrote:
Can I set a textbox (on a form) to accept only integer values? If so
how?
TIA



[email protected]

Integer only textbox?
 
Okay, I was afraid it wouldn't be as simple as a property value.

Thank you.
ImpulseBlue wrote:
Create an _AfterUpdate() routine for your text box and then check if
its an integer in your code.



wrote:
Can I set a textbox (on a form) to accept only integer values? If so
how?
TIA



ImpulseBlue

Integer only textbox?
 
If the tool must use a userform then you are stuck with setting up
events for it, but if you had the input in a cell on a worksheet then
you could use simple Data Validation and set it to only whole
numbers.... just some thoughts


wrote:
Okay, I was afraid it wouldn't be as simple as a property value.

Thank you.
ImpulseBlue wrote:
Create an _AfterUpdate() routine for your text box and then check if
its an integer in your code.



wrote:
Can I set a textbox (on a form) to accept only integer values? If so
how?
TIA




All times are GMT +1. The time now is 10:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com