I wnat to trap the enter keypress event for a text box on a user form in Excel/VBA. When Enter is pressed I want to check that the text of the text box is a valid date, and prevent the focus shifting to the next control if its not.
I can perform the validation, but I can't seem to stop the focus shifting to the next control.
Any idea's anybody please - I'm sure I'm missing something simple here.
I can perform the validation, but I can't seem to stop the focus shifting to the next control.
Any idea's anybody please - I'm sure I'm missing something simple here.