If I want the list behavior of data validation having same function as a Combox, which filters values with distinct, and non_blank in order.
Note: A cell dropdown_list set by using menu bar DATA --> validation --> List........... or a macro module as:
Sub LISTBOX()
ActiveCell.SpecialCells(xlCellTypeSameValidation).Select
With Selection.Validation
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=$E$1:$E$20"
.ShowInput = True
.ShowError = True
End With
End Sub
Thanks.
Note: A cell dropdown_list set by using menu bar DATA --> validation --> List........... or a macro module as:
Sub LISTBOX()
ActiveCell.SpecialCells(xlCellTypeSameValidation).Select
With Selection.Validation
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=$E$1:$E$20"
.ShowInput = True
.ShowError = True
End With
End Sub
Thanks.