PDA

View Full Version : Text box/userform - 2DP?



blackie42
10-12-2007, 01:48 AM
Hi,

is it possible to not only force a user to only input numerics but also to make the numeric input 2 decimal places only?

Got this bit of code which rounds the value to 2 DP when parsing but doesn't explicitly make the user input 2 DP

Value_GBP1 = Abs(Round(GBPValue, 2))

thanks

Jon

lucas
10-12-2007, 08:38 AM
set the maxlength property of the textbox to 2

Edit: I'm sorry I misread this question. That won't work....

lucas
10-12-2007, 08:47 AM
A couple of links that might help:
http://support.microsoft.com/default.aspx?scid=kb;en-us;78113&Product=xlw

http://support.microsoft.com/default.aspx?scid=kb;en-us;214118&Product=xlw