Syntax

expression.InputMessage

expression A variable that represents a Validation object.

Example

This example adds data validation to cell E5 and specifies both the input and error messages.

Visual Basic for Applications
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
change data validation input message input input message Input Message Property InputMessage inputmessage property set input message data validation set text validation rule data validation

See also: