Results 1 to 3 of 3

Thread: Refresh ComboBox after changing ListFill Range

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2002
    Location
    England
    Posts
    21

    Question Refresh ComboBox after changing ListFill Range

    It sounds a basic question but I'm struggling to sort it (I only started learning this last year) !

    I have a ComboBox on an Excel spreadsheet and three OptionButtons. Selecting an OptionButton changes the ListFillRange of the ComboBox. But the text in the ComboBox does not change until it is clicked and a selection made from the new list of items.

    But I want the ComboBox to display the first item in the newly selected list relating to the OptionButton selected.

    My code is;

    Private Sub optCHS_Click()
    ComboBox1.ListFillRange = "CHS"
    End Sub

    Private Sub optSHS_Click()
    ComboBox1.ListFillRange = "SHS"
    End Sub

    Private Sub optRHS_Click()
    ComboBox1.ListFillRange = "RHS"
    End Sub

    The ListFillRange refers to a block of named cells eg. =Sheet1!$A$11:$A$13

    Can anyone help please?

  2. #2
    Addicted Member
    Join Date
    Aug 2002
    Location
    Luton, UK
    Posts
    178
    ComboBox1.ListIndex = 0
    Regards
    BrianB
    -------------------------------

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Oct 2002
    Location
    England
    Posts
    21

    Thumbs up

    So simple and I've spent hours trying to sort it !

    Thanks BrianB !

    Regards

    c.p.morris

Posting Permissions

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



Click Here to Expand Forum to Full Width