ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Validation (Drop down list vs simple text length validation) (https://www.excelbanter.com/excel-programming/296444-re-validation-drop-down-list-vs-simple-text-length-validation.html)

Jason Morin[_2_]

Validation (Drop down list vs simple text length validation)
 
Try something like:

Sub TestValidation()

With ActiveCell.Validation
If .Type = xlValidateList Then
MsgBox "It's a drop-down list!"
Else
MsgBox "It's not a drop-down list!"
End If
End With

End Sub

---
Of course if the active cell doesn't contain validation,
the macro will error out.

HTH
Jason
Atlanta, GA

-----Original Message-----
Hi everyone,
I want to know how to distinguish between a cell that

displays a drop down list in a cell and another that does
not.

Thank you.
.


Jac Tremblay

Validation (Drop down list vs simple text length validation)
 
Hi Jason
Your solution work fine
Thank you very much and have a good day
Ja



All times are GMT +1. The time now is 02:11 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com