+ Reply to Thread
Results 1 to 38 of 38

Data Validation Combobox Help

  1. #1
    Registered User
    Join Date
    03-12-2016
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    19

    Data Validation Combobox Help

    Hi All
    I am rather new to Excel so excuse me if this is a dumb/old question.

    I am trying to use the code developed by Contextures.com to link a Combobox to a Dropdown box.

    I can get the Combobox to show the data from the table that I have created but as soon as I have copied and pasted the code into the VBA, I double click on a Dropdown box and it is blank??

    The sheet with the Dropdown Lists & Combox is named "Test Results" and the sheet with the Table is called "Max Zs values".

    I have posted the code and the file attachment below. Let me know if you require any more info.

    I have tried looking at the example workbook on the Contextures website but I can't see where I am going wrong.

    Can anyone help?

    Thanks in advance.
    Ben


    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by BennyL; 03-12-2016 at 11:45 AM.

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Data Validation Combobox Help

    Hi BennyL

    Welcome to the Forum!!!

    Change your Data Validation Rule.

    Data Validation.jpg
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Data Validation Combobox Help

    could you upload an example file from the site?

  4. #4
    Registered User
    Join Date
    03-12-2016
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    19

    Re: Data Validation Combobox Help

    Thanks for your responses.

    Jaslake, I have tried changing the source to "type" but it doesn't seem to help. Do I need to have any specific cells highlighted when I do this?

    Tim, please see link to the example sheet from Contextures.com

    Thanks for your help
    Attached Files Attached Files

  5. #5
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Data Validation Combobox Help


  6. #6
    Registered User
    Join Date
    03-12-2016
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    19

    Re: Data Validation Combobox Help

    Thanks Jaslake

    Is that working your end?

    On my computer the Combobox pops up to replace the Dropdown box as it should, however, it is blank

  7. #7
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Data Validation Combobox Help

    Hi Ben

    See attached...

    Combo Pic.jpg

  8. #8
    Registered User
    Join Date
    03-12-2016
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    19

    Re: Data Validation Combobox Help

    Hi Jaslake

    Yeah, that is what it is supposed to do but on mine it just comes up blank. I must have some setting wrong somewhere but I'm damned if I can find it.

    Untitled.jpg

  9. #9
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Data Validation Combobox Help

    Hi Ben

    If you wish attach your File WITH THE CODE EMBEDDED and I'll look at it.

    What version of Excel are you running?

  10. #10
    Registered User
    Join Date
    03-12-2016
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    19

    Re: Data Validation Combobox Help

    Thank you so much for your help Jaslake.
    I have attached the workbook with the macros enabled. Is that what you mean?
    Attached Files Attached Files

  11. #11
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Data Validation Combobox Help

    Hi Ben

    You hadn't changed the Data Validation...
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    03-12-2016
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    19

    Re: Data Validation Combobox Help

    Yeah sorry, I sent you the original which hadn't been changed.

    I'm not joking but that workbook you sent back still throws up blank Comboboxes on my computer!

    Do you think that it might be some setting that I've got turned on / off that shouldn't be??

  13. #13
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Data Validation Combobox Help

    Hi Ben

    No, I don't think it's a setting (assuming you've allowed Macros to run). What version of Excel are you running?
    Send the File back...I'll see if I can trouble shoot it.

  14. #14
    Registered User
    Join Date
    03-12-2016
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    19

    Re: Data Validation Combobox Help

    I believe that Macros are allowed.

    I have re-attached. Let me know if you require anything else.

    Thank you
    Attached Files Attached Files

  15. #15
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Data Validation Combobox Help

    Hi Ben

    What do you mean when you say

    I believe that Macros are allowed.
    Have you enabled Macros?
    Allow Macros.jpg

  16. #16
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Data Validation Combobox Help

    Hi Ben

    What Version of Excel are you running?

    It may well be a setting!!!

  17. #17
    Registered User
    Join Date
    03-12-2016
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    19

    Re: Data Validation Combobox Help

    Hi Jaslake

    Sorry forgot that bit! Its 2013.

    When I go into Macro Security and open settings I clicked on "disable macros with notification".

  18. #18
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Data Validation Combobox Help

    Quote Originally Posted by BennyL View Post
    Hi Jaslake

    Sorry forgot that bit! Its 2013.

    When I go into Macro Security and open settings I clicked on "disable macros with notification".
    Yes, that's what it should be...and what do you do here when you open the File?

    Allow Macros.jpg

  19. #19
    Registered User
    Join Date
    03-12-2016
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    19

    Re: Data Validation Combobox Help

    The "Option" box does not appear when I open the workbook. Do you think that might be something to do with it?

  20. #20
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Data Validation Combobox Help

    Hi Ben

    I don't have Excel 2013. SHOW ME the equivalent of this...take a Screen Capture and attach it.

    Trust Center Settings.jpg

  21. #21
    Registered User
    Join Date
    03-12-2016
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    19

    Re: Data Validation Combobox Help

    Hi Jaslake

    Please see attached. It looks like it is the same as what you have there.
    Attached Images Attached Images

  22. #22
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Data Validation Combobox Help

    Hi Ben

    As I don't have Excel 2013 I've asked for help...http://www.excelforum.com/showthread...43#post4337343

    Please follow this Thread as I will.

    Gave the wrong link....http://www.excelforum.com/the-water-...ry-2016-a.html
    Last edited by jaslake; 03-13-2016 at 02:02 AM.

  23. #23
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Data Validation Combobox Help

    Hi Ben

    I'd suggest this has everything to do with it...just don't know why...

    The "Option" box does not appear when I open the workbook. Do you think that might be something to do with it?

  24. #24
    Registered User
    Join Date
    03-12-2016
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    19

    Re: Data Validation Combobox Help

    Thanks for your patience Jaslake

    I will follow the other thread now

    Kind Regards
    Ben

  25. #25
    Valued Forum Contributor tony h's Avatar
    Join Date
    03-14-2005
    Location
    England: London and Lincolnshire
    Posts
    1,187

    Re: Data Validation Combobox Help



    click on the * Add Reputation if this was useful or entertaining.

  26. #26
    Registered User
    Join Date
    03-12-2016
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    19
    Hi Tony
    I have tried the workbook you posted but I am still getting a blank Combobox appear. I am thinking that this must be a setting within my Excel as everyone else seems to be able to get this to work.....frustrating 😠

    Any suggestions would be gladly received.

    Thank you
    Ben

  27. #27
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Data Validation Combobox Help

    Hi Tony/Ben

    This is Tony's File with Data Validation set to "Type" for all Cells in Rows 11 - 47 in Column K (which were not set before).

    Will each of you please try this File in Excel 2013...I suspect our issue is with the Merged Cells (though it DOES work in Excel 2007 and 2010).
    If we find that the issue is merged cells then we can perhaps resolve the issue...except...I don't have 2013 to test with so the two of you will need to do the testing...OK?
    Attached Files Attached Files
    Last edited by jaslake; 03-13-2016 at 06:57 PM.

  28. #28
    Registered User
    Join Date
    03-12-2016
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    19

    Re: Data Validation Combobox Help

    Hi Jaslake

    I have tried the "New Test" sheet on two different copies of Excel 2013 and the issue is still there.

    I also managed to find a thread on the Contextures blog regarding blank Comboboxes but I believe that my spreadsheet is already set up the way that Debra suggests. Could you take a look and confirm for me please.

    http://blog.contextures.com/archives...in-excel-2013/

    Kind regards
    Ben

  29. #29
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Data Validation Combobox Help

    You may use:

    Please Login or Register  to view this content.
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

  30. #30
    Registered User
    Join Date
    03-12-2016
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    19

    Re: Data Validation Combobox Help

    Thanks Izandol
    I'm a newbie to Excel, where should I insert that code?
    Ben

  31. #31
    Valued Forum Contributor tony h's Avatar
    Join Date
    03-14-2005
    Location
    England: London and Lincolnshire
    Posts
    1,187

    Re: Data Validation Combobox Help

    Ok . Now I have a difference
    after the line (in the selection change) .ListFillRange = str

    I added (rather over the top but ..)
    Debug.Print "str=/"; str; "/ .ListFillRange=/"; .ListFillRange; "/end"

    In 2007 you can see that .ListFillRange has been populated correctly with the value from str
    str=/Type/ .ListFillRange=/Type/end

    Whereas in 2013 the value is lost - but str contains the expected value
    str=/Type/ .ListFillRange=//end

  32. #32
    Valued Forum Contributor tony h's Avatar
    Join Date
    03-14-2005
    Location
    England: London and Lincolnshire
    Posts
    1,187

    Re: Data Validation Combobox Help

    This one has surrogate name of TypeB defined as Type and adds a "B" to str in selection change
    Attached Files Attached Files

  33. #33
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Data Validation Combobox Help

    Hi Tony

    Are you inferring your most recent File produces expected results in Excel 2013?

  34. #34
    Registered User
    Join Date
    03-12-2016
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    19

    Re: Data Validation Combobox Help

    Tony

    Thanks for your time earlier.

    The Combobox works as it should now so I can not thank you enough, however, I have found a strange bug when used on a Surface Pro 4 (which is required as the spreadsheet is designed to be used by site engineers). I am unable to write into any cells once a selection has been made in any Combobox, even though it all works fine beforehand.

    Any ideas what this might be?

    Thanks again, Ben

  35. #35
    Valued Forum Contributor tony h's Avatar
    Join Date
    03-14-2005
    Location
    England: London and Lincolnshire
    Posts
    1,187

    Re: Data Validation Combobox Help

    Hi,

    I have asked elsewhere if anyone can check it out on a surface pro

  36. #36
    Valued Forum Contributor tony h's Avatar
    Join Date
    03-14-2005
    Location
    England: London and Lincolnshire
    Posts
    1,187

    Re: Data Validation Combobox Help

    Did you find anything about the Surface Pro bug?

  37. #37
    Registered User
    Join Date
    03-12-2016
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    19

    Re: Data Validation Combobox Help

    Hi Tony
    No nothing as of yet. I have also started a new thread specifically for the Surface Pro issue

  38. #38
    Valued Forum Contributor tony h's Avatar
    Join Date
    03-14-2005
    Location
    England: London and Lincolnshire
    Posts
    1,187

    Re: Data Validation Combobox Help

    Good idea. I'll see how it is going.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Data Validation + ComboBox Autocomplete
    By kiwi_harry in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-16-2014, 10:15 PM
  2. Combobox with Data Validation so that same value cannot be selected
    By brillison in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-12-2014, 11:02 PM
  3. Data Validation ComboBox Error
    By shnoli in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-29-2013, 05:53 PM
  4. Replies: 0
    Last Post: 10-21-2012, 06:25 AM
  5. Another Dependent Data Validation Combobox
    By blacque in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-07-2009, 03:40 AM
  6. ComboBox in a Data Validation List...
    By Bob Barnes in forum Excel General
    Replies: 3
    Last Post: 01-06-2006, 07:10 PM
  7. [SOLVED] data validation vs combobox
    By paul in forum Excel General
    Replies: 4
    Last Post: 10-24-2005, 07:05 PM

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