WML0068,
In the future, please wrap your code in code tags. See forum rules (link in my sig) for how.
As for your question, attached is a sample workbook based on the criteria you described.
The workbook has one sheet that contains a button. The button is only used to launch the test userform, and it is assigned to this macro:
The userform only has a textbox. However, the textbox is coded to only allow any valid number less than 6. This is the complete userform code with comments:
Hopefully you can adapt this to fit your needs.
[EDIT]
Just realized that you don't need to use "Public frmEnableEvents". "Dim frmEnableEvents" should be just fine (and is actually recommended, I just didn't think about it when creating the sample).
Bookmarks