Closed Thread
Results 1 to 11 of 11

Help:Problem with ComboBox

  1. #1
    Registered User
    Join Date
    04-02-2008
    Posts
    12

    Help:Problem with ComboBox

    I used the following tutorial in making a combobox: http://www.contextures.com/xlDataVal10.html

    I already made the Data Validation, so I just made the combobox step by step, exacly the same (same namesm TempCombo etc.). But it wont work. I have the combobox, when I'm out of design mode you won't be able to see it. Just as it should be. When I double click a cell, the box appears. Till this far everything is going just fine.

    But now when I start typing, or press the pull down button. Non of the Data is coming foward. And when I just type something inside of the combobox en press enter, the text just disappears.

    In some sort of way it looks like the ComboBox isn't connecting with the cell of data validation.

    I hope someone has the solution for me.

    Thanks

    Edit: I dont know if this matter, but the Data Validation I use, is data coming from another sheet, while the tutorial uses data from the same sheet. Does this make any difference?

    Edit again: After some tests, I came to the conclusion that it is infact a sheet problem. I defined a name to 3 cells in the same sheet and changed the data validation source, when I did this, the combobox worked fine. But this isn't what I want, I need it to come from another sheet, hope someone can help me out here.

    Please Login or Register  to view this content.
    Last edited by KcA; 04-03-2008 at 06:44 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Are you sure that your code is in the correct modules?

    Attach an zipped example workbook if you want it checking
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    04-02-2008
    Posts
    12
    Yes everything is just the same as the original file. The one you can download from the website. But as I said, it works fine when I link the validation data to cells inside of the same sheet, but when I link the validation data to cells from another sheet, it wont work.

    So I tried to change some of the codering from worksheets to workbooks and such. But I don't think I did it with the right ones, I'm new to vba so it's hard for me to tell which ones I should change or whatever I should change to the codering.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    I'm sure that it should not make any difference where the Data validation list is, the code simply uses the list to populate the combobox

  5. #5
    Registered User
    Join Date
    04-02-2008
    Posts
    12
    Then why does it works when I test it on some cells in the same sheet and dont work when its in another?

    Its obvious that the problem lays there now, isnt it?

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello KcA,

    Copy this macro. See the line in red in the code. This is were you need to make the change. Specify the worksheet name and range where your list is. The example below sets the list to Sheet2 range "K1:K12". Change this to the sheet name and range you want.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  7. #7
    Registered User
    Join Date
    04-02-2008
    Posts
    12
    Ahhhh! It worked!

    Thank you very much!

  8. #8
    Registered User
    Join Date
    12-13-2008
    Location
    Sydney
    Posts
    14
    Hi,

    This works perfect for me when the workbook is not shared. Is there anyway for me to make it work when it is shared. Plz help.

    Thanks is advance

  9. #9
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    SRJ, your post does not comply with Rule 2 of our Forum Rules. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread.

  10. #10
    Registered User
    Join Date
    02-17-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Help:Problem with ComboBox

    SRJ, this is exactly what I need as well. My data is on other sheets and it has to work as well when shared... Can someone please help me?

  11. #11
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Help:Problem with ComboBox

    Frost, read my previous post, it applies to you as well!

Closed 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