I forgot to add, the above code allows you to do the following:
- Add a minus sign/hyphen to the first position in the textbox but nowhere else.
- enter 1No. decimal point after a number
- It will not allow letters or other symbols
- It deals with pasting invalid values into the text box i.e. text strings
- It It alerts you to not leave the text box empty after an attempted paste & clear operation