Microsoft Office Tutorials and References
In Depth Information
Figure 19-27. The Error Alert tab of the Data Validation dialog
Figure 19-27 shows the Error Alert tab. This dialog corresponds to the following properties of the
Validation object:
ShowError = True
ErrorTitle = "Error:"
ErrorMessage = "This is an error"
Figure 19-27. The Error Alert tab of the Data Validation dialog
We can now put all of the pieces together to show how to set up data validation for a range of cells.
Note that the first order of business is to delete any old validation:
With Range("A1:D4").Validation
.Delete
.Add Type:=xlValidateWholeNumber, _
AlertStyle:=xlValidAlertStop, _
Operator:=xlBetween, _
Formula1:="5", Formula2:="10"
.IgnoreBlank = True
.ShowInput = True
.InputTitle = "Input:"
.InputMessage = "Input a number"
 
 
Search JabSto ::




Custom Search