+ Reply to Thread
Results 1 to 8 of 8

Filtered combo box list in userform?

  1. #1
    Forum Contributor
    Join Date
    02-08-2006
    Location
    UK
    MS-Off Ver
    2013
    Posts
    204

    Filtered combo box list in userform?

    Wonder if anyone can help with this.

    I have Sheet1 with columns A, B and C containing data. Column D has data in some cells.

    There is also a userform which has a combobox list which has a row source (column A) and three text boxes for the remaining cells that are Vlookups.

    What I want to be able to do is filter that dropdown list so that it will only display rows where column D is blank.

    Does that make sense?
    Last edited by wonderdunder; 12-02-2011 at 06:04 AM.

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Filtered combo box list in userform?

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook. Don't upload a picture when you have a workbook question. None of us is inclined to recreate your data. Upload the workbook and manually add an 'after' situation so that we can see what you expect. In addition clearly explain how you get the results..
    To attach a file to your post, you need to be using the main 'New Post' or 'New Thread' page and not 'Quick Reply'.
    To use the main 'New Post' page, click the 'Post Reply' button in the relevant thread.

    On this page, below the message box, you will find a button labelled 'Manage Attachments'.
    Clicking this button will open a new window for uploading attachments.

    You can upload an attachment either from your computer or from another URL by using the appropriate box on this page.
    Alternatively you can click the Attachment Icon to open this page.

    To upload a file from your computer, click the 'Browse' button and locate the file.

    To upload a file from another URL, enter the full URL for the file in the second box on this page.
    Once you have completed one of the boxes, click 'Upload'.

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Forum Contributor
    Join Date
    02-08-2006
    Location
    UK
    MS-Off Ver
    2013
    Posts
    204

    Re: Filtered combo box list in userform?

    Thanks for replying. Here's a very basic and rough sheet.

    The command button brings up a userform. When you select a reference number from the list on the combo box, the other two boxes are populated using a vlookup.

    The combo box should only list rows where there is no data in column C
    Many thanks for the help
    Attached Files Attached Files

  4. #4
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Filtered combo box list in userform?

    Hi wonderdunder
    with the "row source" empty

    place this code in the userform
    Please Login or Register  to view this content.

  5. #5
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Filtered combo box list in userform?

    also you will need to format the text box
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    02-08-2006
    Location
    UK
    MS-Off Ver
    2013
    Posts
    204

    Re: Filtered combo box list in userform?

    many thanks Pike - that's exactly what I needed. I knew the date box needed formatting - I didn't do it for this out of laziness - it could have shown anything!

    Thanks again

  7. #7
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Filtered combo box list in userform?

    No problem glad to help

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

  8. #8
    Forum Contributor
    Join Date
    02-08-2006
    Location
    UK
    MS-Off Ver
    2013
    Posts
    204

    Re: Filtered combo box list in userform?

    Sorry - another question. I'm just adapting the code to the actual form I'm using. Can you tell me what the purpose of highlighted bits below? Thanks again

    Quote Originally Posted by pike View Post
    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)

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