Microsoft Office Tutorials and References
In Depth Information
Figure 19-25. The Settings tab of the Data Validation dialog
The xlValidateInputOnly constant causes Excel to treat all data as valid. This value should
be used when we want to display an input message (described later in this section), but not invoke
data validation.
The optional AlertStyle parameter specifies the buttons that will appear on the error dialog
box that is displayed if the data entered is invalid. It can be one of the following
XlDVAlertStyle constants:
Enum XlDVAlertStyle
xlValidAlertStop = 1
xlValidAlertWarning = 2
xlValidAlertInformation = 3
End Enum
The meanings of these constants are as follows:
OK and Cancel buttons
Retry and Cancel buttons
Yes, No, and Cancel buttons
The optional Operator parameter is the operator used in the validation, and can be any one of
the XlFormatConditionOperator constants:
Enum XlFormatConditionOperator
xlBetween = 1
xlNotBetween = 2
xlEqual = 3
xlNotEqual = 4
xlGreater = 5
xlLess = 6
xlGreaterEqual = 7
xlLessEqual = 8
End Enum
The Formula1 parameter specifies the first part of the data-validation equation and Formula2
specifies the second part when Operator is xlBetween or xlNotBetween .
To understand this rather complex object, it is best to look at the corresponding dialog boxes in the
Excel user interface. Figure 19-25 shows the Settings tab of the Validation dialog box.
Figure 19-25. The Settings tab of the Data Validation dialog
Search JabSto ::

Custom Search