+ Reply to Thread
Results 1 to 2 of 2

Dynamic combo Lists??

  1. #1
    Registered User
    Join Date

    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"

    Case Else
    Exit Sub
    End Select

    End Sub

    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!


    Mickie DeVries

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    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.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1