GetInputMessage
Returns the data validation input message.
Syntax
expression.GetInputMessage();
expression - A variable that represents a ApiValidation class.
Parameters
This method doesn't have any parameters.
Returns
string
Example
This example gets the input message text.
- Code
- Result
// How to retrieve the validation input message.
// Get the input message.
let worksheet = Api.GetActiveSheet();
let range = worksheet.GetRange("A1");
let validation = range.GetValidation();
validation.Add("xlValidateWholeNumber", "xlValidAlertStop", "xlGreater", 10);
validation.SetInputMessage("Enter a number greater than 10");
let inputMessage = validation.GetInputMessage();
worksheet.GetRange("B1").SetValue("Input message: " + inputMessage);