Validation.InCellDropdown property (Excel)

True if data validation displays a drop-down list that contains acceptable values. Read/write Boolean.

Syntax

expression.InCellDropdown

expression A variable that represents a Validation object.

Remarks

This property is ignored if the validation type isn't xlValidateList.

Use the Formula1 argument of the Add or Modify method of the Validation object to specify the range that contains valid data.

Example

This example adds data validation to cell E5. The range A1:A10 contains the acceptable values for the cell, and the cell displays a drop-down list that contains those values.

With Range("e5").Validation 
 .Add xlValidateList, xlValidAlertStop, xlBetween, "=$A$1:$A$10" 
 .InCellDropdown = True 
End With

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.