PDA

View Full Version : Combobox linked to Listbox



Ethan
09-17-2011, 01:05 AM
Hello all,

I am working on a userform that is linked to a Listbox.
By selecting a record from the listbox and hitting the "EDIT"-button the userform can be accessed.

At this moment the user is able to edit the values of textboxes and save it.
However I like to use a combobox for the "post"
The range from which the user can choose should be M2:M
when saved it should be stored in range L:L on sheet "Database"

Important is that when the userform is called again it initializes the chosen "post".

I hope this all make any sense.

Bob Phillips
09-17-2011, 03:22 AM
Just change it to a combobox, and set the RowSource to M2:M6.

Ethan
09-17-2011, 05:51 AM
Just change it to a combobox, and set the RowSource to M2:M6.

Thanks xld, that solved the "populate combobox" part.
But how do I initialize it with the selected item from the listbox?

Ethan
09-17-2011, 11:32 AM
Perheps someone else?

Bob Phillips
09-17-2011, 12:03 PM
In the initialise


ComboBox1.ListIndex = -1