AlertStyle Property

Microsoft Excel Visual Basic

AlertStyle Property

       

Returns the validation alert style. Read-only XlDVAlertStyle.

XlDVAlertStyle can be one of these XlDVAlertStyle constants.
xlValidAlertInformation
xlValidAlertStop
xlValidAlertWarning

expression.AlertStyle

expression   Required. An expression that returns one of the objects in the Applies To list.

Remarks

Use the Add method to set the alert style for a range. If the range already has data validation, use the Modify method to change the alert style.

Example

This example displays the alert style for cell E5.

MsgBox Range("e5").Validation.AlertStyle