Hello,
With Range("e5").Validation
.Add Type:=xlValidateWholeNumber, _
AlertStyle:=xlValidAlertInformation, _
Minimum:="5", Maximum:="10"
.InputTitle = "Integers"
.ErrorTitle = "Integers"
.InputMessage = "Enter an integer from five to ten"
.ErrorMessage = "You must enter a number from five to ten"
End With
This above code will Add Data Validation to a Cell.
Is their a way to then retrieve back what Type it is ?
For example from the above code it is being set to the Type of
"xlValidateWholeNumber". How can this later on be retreived so I can tell
what type it is ?
Something like strType = Cells(5,5).Validation.Type
'Notes this does not work but something like this is what I am looking for.
Any help would be greatly appreciated.
Thank you,
Jeff
Bookmarks