Skip to content

Latest commit

 

History

History
45 lines (30 loc) · 1.01 KB

Excel.Validation.InputMessage.md

File metadata and controls

45 lines (30 loc) · 1.01 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Validation.InputMessage property (Excel)
vbaxl10.chm532081
vbaxl10.chm532081
Excel.Validation.InputMessage
cef219c7-4fb2-128c-b091-170f63f70a98
05/18/2019
medium

Validation.InputMessage property (Excel)

Returns or sets the data validation input message. Read/write String.

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.

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]