+ Reply to Thread
Results 1 to 5 of 5

combobox2 change --> combobox1 change

  1. #1
    Registered User
    Join Date
    07-25-2013
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    22

    combobox2 change --> combobox1 change

    I have two columns with ids (column 1 and column 3). The ids in Column 3 aren't unique (but are in the combobox(2)). What I want is that when I pick an ID in combobox2, only the ids of column1 on the same row(s) as these id(s) stay in the combox1. I can't get it to work. Even not with google

    mabulco

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: combobox2 change --> combobox1 change

    How isn't it working?

    The only thing wrong, and it won't affect anything, is the unneeded For Each loop.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    07-25-2013
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: combobox2 change --> combobox1 change

    I remove the For Each loop. I should have been clearer about the problem I'm experiencing. The problem is, that absolutely nothing happens. Combobox1 stays empty. Could it be that I didnt get the range straight? ie. not the content of column1?

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: combobox2 change --> combobox1 change

    If the IDs you want to match with what's selected in combobox2 are in column A (1) then the If should be like this.
    Please Login or Register  to view this content.
    I think that's right anyway.

    Perhaps uploading a sample workbook might make things clearer.

  5. #5
    Registered User
    Join Date
    07-25-2013
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: combobox2 change --> combobox1 change

    test.xlsmHere is my workbook. In the workbook: if i select 1 in combobox2. 1, 2, 3 (a1, a2, a3) should only be visible in combobox1.

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: combobox2 change --> combobox1 change

    You had things the right way round in the first code, think I was confused because the textboxes are sort of the wrong way round, you would normally be populating the second combobox based on the first.

    But anyway, try this.
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Disabling dependent combobox2 until selection is made in combobox1
    By newqueen in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-24-2013, 11:25 AM
  2. [SOLVED] items in combobox2 depending on combobox1
    By minifreak in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-15-2012, 10:52 AM
  3. Using Entry of ComboBox1 to decide the entries of ComboBox2 using Excel Columns
    By sungodking in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-12-2012, 08:11 AM
  4. Using Entry of ComboBox1 to decide the entries of ComboBox2 using Excel Columns
    By sungodking in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-12-2012, 06:51 AM
  5. Combobox2 dependent on Combobox1
    By teacher_rob in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 11-19-2011, 10:10 AM

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