+ Reply to Thread
Results 1 to 10 of 10

several comboboxes for one active cell

  1. #1
    Forum Contributor
    Join Date
    04-27-2010
    Location
    Lisbon, Portugal
    MS-Off Ver
    Excel 2007
    Posts
    115

    several comboboxes for one active cell

    Hello,

    I need help with the following issue:

    I have a userform with a cascading combobox. The 1st cbo has 4 options, and according to the data inserted in the first cbo, it becomes visible one of four different cbo's.

    My problem is that the differente cbo's should feed the same column in the "Base Dados" sheet.

    Here is part of the code:
    Please Login or Register  to view this content.
    I run the userform ok but the data doesn't show in the "Base Dados" sheet.

    I hope someone can help me.

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,978

    Re: several comboboxes for one active cell

    Why don't you just use two comboboxes and alter the data in the second one based on what you choose in the first? That way, you only have to populate the sheet from one combobox.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Forum Contributor
    Join Date
    04-27-2010
    Location
    Lisbon, Portugal
    MS-Off Ver
    Excel 2007
    Posts
    115

    Re: several comboboxes for one active cell

    The objective of creating several comboboxes is to avoid having 40 options in the second combobox and, based on the option selected in the first combobox, only the correspondent options populate the second combobox.

    I don´t know how to do this using vba? is it even possible?

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,978

    Re: several comboboxes for one active cell

    You wouldn't have 40 options in the second combo - there wouldn't be any until you pick an option from the first one. A sample workbook would make this easier...

  5. #5
    Forum Contributor
    Join Date
    04-27-2010
    Location
    Lisbon, Portugal
    MS-Off Ver
    Excel 2007
    Posts
    115

    Re: several comboboxes for one active cell

    Ok romperstomper,

    here is a sample of the book i'm using.
    Hope you can help me. Thanks in advance.
    Attached Files Attached Files

  6. #6
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,978

    Re: several comboboxes for one active cell

    Care to give me a hint where I should be looking, and what is supposed to do what?

  7. #7
    Forum Contributor
    Join Date
    04-27-2010
    Location
    Lisbon, Portugal
    MS-Off Ver
    Excel 2007
    Posts
    115

    Re: several comboboxes for one active cell

    Sorry,

    In the User Form frmfrontoffice theres a combobox "cbointerlocutor" with 7 different options. Then i have 5 combobox "combobox 4, 5, 6, 7, 8" next to the label20 "tipificação" (this cbo's and label are invisible until something is selected in cbointerlocutor)

    (It appears that theres only one combobox, but in fact, there's 5. All of them at the same height)

    According to the data picked in the "cbointerlocutor", only the correspondent combobox appears.

    This is working fine (i'm guessing)...

    Then, when i click the commandbutton"cmdguardar" all the data goes to the "Base Dados" sheet. All of it except the column H, where should be the data from the second combobox.

    I hope i was clear enough. Sorry the menus are in portuguese.

  8. #8
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,978

    Re: several comboboxes for one active cell

    Try this version.
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    04-27-2010
    Location
    Lisbon, Portugal
    MS-Off Ver
    Excel 2007
    Posts
    115

    Re: several comboboxes for one active cell

    I've tryed it.

    It's working great...Thank you very much

  10. #10
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,978

    Re: several comboboxes for one active cell

    Glad to help. Please don't forget to mark the thread Solved.

+ 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