+ Reply to Thread
Results 1 to 10 of 10

Combo boxes - can I type data directly into a combo box??

  1. #1
    Registered User
    Join Date
    11-07-2006
    Posts
    8

    Combo boxes - can I type data directly into a combo box??

    I'm trying to set up a box whereby I can enter company names and they will automatically be saved in that box, the company names will relate to various financial figures that I would also like to be brought up once they select the company from the list. Is there any way I can do this??? Sometimes the user will need to enter new companies to the list so I that means I can't use a table to populate with the data! Can I use a combo box for this??

    Thanks in advance

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486

    Enter new entries in combobox

    Here's an example, if the name is not on the list, the user can enter it then a message will pop up asking if you want the new name on the list
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    11-07-2006
    Posts
    8

    Thanks

    Brilliant, thanks for your help, that's exactl what I wanted to do!

  4. #4
    Registered User
    Join Date
    11-07-2006
    Posts
    8

    One other question

    Dave,

    I also want the items that I type into the combo box to appear in it, ie. when the user scrolls down I want them to be able to find the info that they just added. Any idea??

  5. #5
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486
    What do you mean?
    Oh..
    the user has to exit from the combobox before the macro asks if they want the new name added, once they say OK, then the new name will be on the list
    next time they drop into the ComboBox the new name will be there...

  6. #6
    Registered User
    Join Date
    11-07-2006
    Posts
    8
    Unfortunately I'm not familiar with VB so cant get this to work for my own purpose, also, is there any way that I can delete items from the combo box?

  7. #7
    Registered User
    Join Date
    11-07-2006
    Posts
    8
    Can anyone help me out with the above???

    I have placed my combo box directly onto my spreadsheet and not using VBA as I'm not familiar with it!

  8. #8
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486
    Well, you need VBA to use it...

    I'm trying to set up a box whereby I can enter company names and they will automatically be saved in that box, the company names will relate to various financial figures that I would also like to be brought up once they select the company from the list. Is there any way I can do this??? Sometimes the user will need to enter new companies to the list so I that means I can't use a table to populate with the data! Can I use a combo box for this??
    How else can this be done with out a macro, or VBA same thing...

    Did I not send you an example of how this works??

    How can I help you>>>

    Maybe zip a copy of your workbook and somebody or myself can get it to work for you,......

    Are you really using a combobox or a drop down menu from data validation, it doesnt matter what you are using, it is something that would help us understand though...

  9. #9
    Registered User
    Join Date
    11-07-2006
    Posts
    8
    Hi Dave,

    Apologies for not being clearer to start off with.

    I've attached a file which is the screen the user will input all data into. What I'm trying to do is the following:

    1. The user needs to be able to enter, retrieve and also delete company names

    2. Likewise, if they have entered a company name, they then need to enter which year the figures are for. Similarly, if they choose a company already in the company combo box, then they will need to select which years figures they need to retrieve.

    3. When the user selects a company/year, then the various other txt fields would need to be retrieved. And in turn if the user is entering a new company then they'll need to type this info in.

    I think i'll need to populate this data into a dynamic table perhaps as I will in the end want to be able to create a dynamic graph based on what years and what company the user selects.

    Any help on this would be very much appreciated, as i'm baffled.

    Thanks
    Attached Files Attached Files
    Last edited by Baz1811; 11-11-2006 at 05:00 AM.

  10. #10
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486
    Got it,

    I see why the code wouldn't work for you, you are using the combobox from the forms toolbar, no problem though, just select the combobox from the controls toolbar, This way why can manipulate with VBA

    Here's an updated version,
    click on the company combobox and select an item, next time select the company combobox and enter a new item, when you exit from there the code kicks in, the list is in sheet one, when you add a new company name to the combobox check out the list in sheet 1,

    Check out the clear contents macro as well
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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