Userform Combo box to mimick Worksheet Cell validation list range.

L

LaDdIe

Hi Everyone,

Is there a method which tells a Userform Combo box to mimick active
Worksheet Cell validation list range.

My worksheet contains data validation lists in various places,
I have designed a userform combo box, in order to 'quick search', but rather
than hard code the list range, I need the userform combo box to mirror the
data validation list range of the active cell.

Thanks.

LaDdIe
 
J

Joel

Add the code to the initial function of the userform.

ListRange = Range("A1").Validation.Formula1
'remove equal sign
ListRange = Mid(ListRange, 2)
UserForm1.ListBox1.RowSource = ListRange
 

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