+ Reply to Thread
Results 1 to 7 of 7

Combo List

  1. #1
    Registered User
    Join Date
    01-07-2009
    Location
    Coventry, England
    MS-Off Ver
    Excel 365
    Posts
    58

    Combo List

    Hey guys,

    I want to make a UserForm and i'm stuck at a simple operation. I need a list in my form, simple "Name/Number" list (only two options) but i don't want it to refer to any cell in the worksheet.
    I want to input a text in a textbox and with the selection in the list above i want to have multiple choices at how to approach the text (if i input a name i want it to be different than if i input a number). All the info i came up on the web refers to lists made upon a range of cells.
    How can i make a list without involving ranges of cells?
    Last edited by kroz; 03-05-2009 at 07:55 AM.

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile Re: Combo List

    Good morning kroz
    Quote Originally Posted by kroz View Post
    All the info i came up on the web refers to lists made upon a range of cells.
    How can i make a list without involving ranges of cells?
    I must admit I'm not entirely sure what you mean, but this is how you populate a listbox (in this instance called ListBox1) without involving a range of cells. You will need an event to hang this from - if you're having the items in the listbox change when a text box is entered, then the UserForm_Initialize event may not be the right one for you :
    Please Login or Register  to view this content.
    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  3. #3
    Registered User
    Join Date
    01-07-2009
    Location
    Coventry, England
    MS-Off Ver
    Excel 365
    Posts
    58

    Re: Combo List

    I think it should work, if i get stuck i'll let you know.

  4. #4
    Registered User
    Join Date
    01-07-2009
    Location
    Coventry, England
    MS-Off Ver
    Excel 365
    Posts
    58

    Re: Combo List

    Let me explain in depth what i want to do. I have a list of input lines that can look like this:

    Account created by: X(Y)
    Account created by: X(Y)
    Account created by: X(Y)
    Account created by: X(Y)

    or like this:
    Owner of account is: X(Y)
    Owner of account is: X(Y)
    Owner of account is: X(Y)
    Owner of account is: X(Y)

    (up to 15 recordings)

    I need to make a form that will match X and Y with a database (X with column A and Y with AD or AE of Sheet 1) and return all the data related to that reference (columns A to AE of the row where X is found in A).

    I'm not sure how to approach this problem. I can either make two lists (one in which the user can select Owner/Account so that the input would be processed accordingly and the other in which he can select what kind of data Y is - so that my form will make the match against AE or AD).
    I have a vague idea on how to do this but i'm still struggling.
    Another approach would be to create radio buttons or maybe even sort everything inside the form (with if InStr).
    Can you give me an idea on how to approach this problem?

  5. #5
    Registered User
    Join Date
    01-07-2009
    Location
    Coventry, England
    MS-Off Ver
    Excel 365
    Posts
    58

    Re: Combo List

    I changed the strategy a bit - i got my search engine inside the cells in the sheet and all i need to do is put the name in column A of each row.
    Please Login or Register  to view this content.
    I solved the while problem - I forgot to put the condition to get out of the loop. The problem now is that it doesn't take all the data in the name. If i input "Owner of the account * John McDee Erby (max access account)" it will take "John McDee Erby (ma".
    In other recordings it doesn't take the whole name..
    I must be missing something..
    Last edited by kroz; 03-05-2009 at 04:24 AM.

  6. #6
    Registered User
    Join Date
    01-07-2009
    Location
    Coventry, England
    MS-Off Ver
    Excel 365
    Posts
    58

  7. #7
    Registered User
    Join Date
    01-07-2009
    Location
    Coventry, England
    MS-Off Ver
    Excel 365
    Posts
    58

    Re: Combo List

    heh, i struggled all by myself in this post.
    Ok, here's the solution i found:

    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