in-cell on-the-fly list/combo box

D

DoctorG

I am not sure how to express this and thus have had no luck searching if it
has been asked before.

I have seen spreadsheets where, upon entering a cell which "accepts" certain
input (Yes/No, True/False etc), a list or combo box is "created" on the fly
within the cell and restricts input to the predefined values.

Can anyone explain how it is done or where I can find information?

Thanks for bearing with me!
 
D

DoctorG

Thanks ND Pard. I looked up "Data Validation" in Help and the following code
did the trick.

With ActiveCell.Validation
.Delete
.Add xlValidateList, xlValidAlertStop, xlBetween, "=ValuesRange"
.InCellDropdown = True
End With
 
R

Rick Rothstein

Just so you are aware... you can do that from the menu bar as well (click
Data/Validation and fill-in the dialog box).
 
D

DoctorG

Weeeellllllll...... it was kinda easier than I thought......

Ok, Rick, point well taken : learn the basics, then move on.

Nevertheless I "touched" things I wouldn't have otherwise.

Thanks a lot, both of you !!!!!

Now what about the next question concerning Worksheet_Change after the
validation?
 
R

Rick Rothstein

I don't see an earlier question from you regarding Worksheet_Change and your
brief mention of it is not enough to figure out what your actual need is
related to it... can you provide more detail please?
 
D

DoctorG

Sorry Rick, it's not an earlier question. It's the second question after this
one. You see it became evident after I had the validation in place. Bernie is
trying to help on that as we "speak".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top