This will prevent the user from entering anything other than a non-negative integer.
If you want the user to be able to enter any number, you could use this kind of code.
The BeforeUpdate event is to change the text that the user enters into a standard format.
This code will force a "general" format, so that if either "1.23000" or "123e-02" is entered, they will both be shown as "1.23" (after the focus leaves the textbox).
You could change that to any format that you prefer.
Note that the BeforeUpdate event uses the Val function to convert a string into a number.
Bookmarks