Userform w/ Multiple listboxes that link

  • Thread starter Thread starter miker1999
  • Start date Start date
M

miker1999

Hello,
I am now about to experiment into the wonderful world o
Userforms....and I'm nervous.

Currently, I have the validation set up on 2 columns that link. Th
first column is Department and the second column only shows Position
available in what was selected in Department. I use VLOOK t
accomplish this (=INDIRECT(VLOOKUP(F4,DeptLookUp,2,0))....F4=Departmen
selected...

I have the first listbox with RowSource = Department. How do I lin
this to the second listbox and only populate and list the Positions fo
that Department? Is this possible?

Thanks a bunch
 
Mike, double click on the first listbox. That will put you in the userform
code module and the listbox click event. Then in the right hand dropdown,
select the change event. In the change event procedure write statements
that would populate the second listbox based on the selection in the first
listbox. Most likely you should do a listbox Clear statement before
populating. I have found it best to use the AddItem approach to populate
listboxes versus specifying a source range.

Bob Flanagan
Macro Systems
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel
 
Bob,
Thanks for the reply. I am with you up until the part where I shoul
'write statements that would populate the second list box.' Can yo
give me an idea on that?
Thanks,
Mik
 

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

Back
Top