Dynamic combo Lists??
What I'm trying to do is I have a combo box that gets a list of names from another sheet and I have each name linked to a named range on the worksheet. This is so the user can select a name from the combo box and then it takes them right to that person's information on the same page so they do not have to scroll down. This works fine. I have the links hard coded into the ComboBox change function like this:
Private Sub ComboBox1_Change()
Case Is = "Beechy, Mahlon"
Case "Beighley, David"
However I added code for a userform that adds an employee to the list of employees and it shows up into the combo box, but I don't know how to link to it.
The problem I'm having is I don't know that I can dynamically insert code into the ComboBox1_Change() function. And I'm not sure how else I would be able to do this.
Any ideas of how to make this work when an employee is added without hard coding the value each time I add an employee would be great!
How are you currently populating the combobox?
Have you considered adding another (hidden) column to it that contains a reference to the employee's range?
You could then refer to this in the change event rather than using a Select Case statement.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Search Engine Friendly URLs by vBSEO 3.6.0 RC 1