+ Reply to Thread
Results 1 to 3 of 3

Setting ComboBox.RowSource via Named Range

  1. #1
    Registered User
    Join Date
    06-14-2007
    Posts
    11

    Setting ComboBox.RowSource via Named Range

    I have two named ranges - name1 and name2 and one ComboBox and two OptionButtons button1 and button2. I want ComboBox to display name1 values when button1 is pressed, and name2 values when button2 is pressed. The event code for button1, e.g., has the code:

    ComboBox.RowSource = name1

    But for some reason the ComboBox displays no values. I know the named ranges are valid because when I set ComboBox.RowSource =name1 in the form itself, it works perfectly.

    Any help on how the RowSource property can be set to a named range at runtime would really be appreciated.

    Thanks very much.

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    Try

    Please Login or Register  to view this content.
    The way you were doing it, it assumed name1 was a variable, which would have contained nothing.


    HTH

    rylo

  3. #3
    Registered User
    Join Date
    06-14-2007
    Posts
    11
    Rylo,
    Thanks a million - that solved it!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Bookmarks

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