Hello,
I have 20 TextBoxes on a UserForm.
How would I loop through the textboxes to ensure that the current textbox date value is not LESS THAN the previous textbox and is not GREATER THAN the textbox after it.
I am already comfortable using CDate in my visual basic code to check other dates in other forms, but I'm hoping there is an easy way to loop through all of them on this particular form and display an error if and when the LESS THAN or GREATER THAN are true as mentioned in my example above.
I am also already aware that the first TextBox will have no previous date to check against as well as the last textbox having no next textbox to check against, I can easily work around those things.
The current textbox can be EQUAL to either the previous textbox or the next textbox.
The textboxes are named in order, I am looking at looping through TextBox1 through TextBox20 to do this.
Thanks to anyone in advance who can point me in the right direction or get me started.
Bookmarks