Hi,

I want to use vba to restrict the value entered into a textbox on a userform to a percentage amount, upto 2 decimal places.

Lets say it's userform1 and textbox1

Upon entering something into the textbox, if its anything other than a numerical value from 0.00 - 100.00, or to anymore than 2 decimal places... show a message box stating the value entered is not valid and delete what ever was typed into the textbox.

Please can someone do an example code that would achieve this, it would be helpful for me.

Many thanks in advance.