How to use validation formulas in Combobox

G

GlenC

What I want to do is for when the user selects a cell, a combo box based on
the field name pops up for better viewing and autocomplete, after a couple of
keystrokes the selection is complete and a {Tab} or {Enter} key will populate
the cell and it will be validated and move to the next cell. I have the data
validation and movement working OK but the ComboBox is driving me batty.

The data validation formula is ="=INDIRECT(VLookup(" & Place & ", lookup1,
2))" Where place is the Field title. This works in Data validation, but when
I try to place in a combobox, I continue to get the formula in text form and
not the value (name of the validation list) that I need.

Anyone have sugestions?
 
G

GlenC

Worked out how to get the list right in the Combobox.

stg = Target.Validation.Formula1
stg = Right(stg, Len(stg) - 1)
stg = Mid(stg, 10, Len(stg) - 10)
stg = Evaluate(stg)
Then used stg as the .ListFillRange

Still want to exit the combo box with a keystroke.
 

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