validating dates on a userform
How about two comboboxes; that will limit the dates. As far as doing a
comparison, how about this:
If Me.cboNoTwo.Value < Me.cboNoOne.Value Then
MsgBox "Please make sure the ending date is greater than the beginning
date."
End If
--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.
"Gabe" wrote:
I have two text boxes on a user form, one start date and one end date. My
problem is that I need the right code for applying the validation to the text
boxes. They must fit the following criteria:
1. The start date can't be greater than the end date, and vice versus.
2. The dates entered in both fields can only be within a specific range of
dates (7/1/2009 through 7/31/2011). So the user won't be allowed to enter any
dates before or after this specific range.
If anyone has an idea please let me know.
Thanks,
~Gabe
|