title | keywords | f1_keywords | api_name | ms.assetid | ms.date | ms.localizationpriority | ||
---|---|---|---|---|---|---|---|---|
Validation.InputMessage property (Excel) |
vbaxl10.chm532081 |
|
|
cef219c7-4fb2-128c-b091-170f63f70a98 |
05/18/2019 |
medium |
Returns or sets the data validation input message. Read/write String.
expression.InputMessage
expression A variable that represents a Validation object.
This example adds data validation to cell E5 and specifies both the input and error messages.
With Range("e5").Validation
.Add Type:=xlValidateWholeNumber, _
AlertStyle:= xlValidAlertStop, _
Operator:=xlBetween, Formula1:="5", Formula2:="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
[!includeSupport and feedback]