GetInputTitle
Returns the title of the data-validation input dialog box.
Syntax
expression.GetInputTitle();
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 title.
- Code
- Result
// How to retrieve the validation input title.
// Get the input title.
let worksheet = Api.GetActiveSheet();
let range = worksheet.GetRange("A1");
let validation = range.GetValidation();
validation.Add("xlValidateWholeNumber", "xlValidAlertStop", "xlGreater", 10);
validation.SetInputTitle("Enter Value");
let inputTitle = validation.GetInputTitle();
worksheet.GetRange("B1").SetValue("Input title: " + inputTitle);