+ Reply to Thread
Results 1 to 13 of 13

ComboBox Doesn't Show Values When Made Visible

  1. #1
    Registered User
    Join Date
    12-28-2017
    Location
    North Carolina
    MS-Off Ver
    2016
    Posts
    13

    ComboBox Doesn't Show Values When Made Visible

    Hello,

    I have the following code that hides my row and Dependent combo box based on a Cell Value (E4); however, when my Primary Combo Box meets the requirements for Cell E4, my unhidden Dependent Box no longer shows the populated values. The Dependent Box works fine until it is hidden and unhidden.

    Please Login or Register  to view this content.
    Please help.
    Please Login or Register  to view this content.
    [/CODE]
    Attached Files Attached Files
    Last edited by VinchinzoB; 04-13-2018 at 12:55 PM.

  2. #2
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: ComboBox Doesn't Show Values When Made Visible

    Deleted, User complied with request
    Last edited by gmr4evr1; 04-13-2018 at 01:02 PM.
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  3. #3
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: ComboBox Doesn't Show Values When Made Visible

    Deleted, User took care of the request.
    Last edited by Arkadi; 04-13-2018 at 01:22 PM.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  4. #4
    Registered User
    Join Date
    12-28-2017
    Location
    North Carolina
    MS-Off Ver
    2016
    Posts
    13

    Re: ComboBox Doesn't Show Values When Made Visible

    Hello Arkadi,

    I've made the necessary changes and added a copy of the workbook.

  5. #5
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: ComboBox Doesn't Show Values When Made Visible

    @gmr4evr1, love the signature

    VinchinzoB,

    I don't understand the problem... if the dependent box is hidden (for example if we pick Butterfree), and then pick Charizard again, the dependent box is populated fine...
    Picking Mewtwo does not populate the dependent box, but that is because there is no named range called Mewtwo so there are no items to add...

    Can you explain in more detail what is wrong and how I can reproduce the problem?
    Last edited by Arkadi; 04-13-2018 at 01:23 PM.

  6. #6
    Registered User
    Join Date
    12-28-2017
    Location
    North Carolina
    MS-Off Ver
    2016
    Posts
    13

    Re: ComboBox Doesn't Show Values When Made Visible

    That's odd because when I choose Butterfree and then go back to Charizard, the dependent box is visible again, but the box is not populated. Would it have anything to do with me working on Excel 2016?

  7. #7
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: ComboBox Doesn't Show Values When Made Visible

    Yes the different Excel versions can behave differently, but it is pretty odd that something like this should be different on the 2 versions.... If you put a stop at "Set ws..." and then step through the code with F8 (when choosing Charizard after Butterfree), does it go through the code properly?

    If that does not reveal anything, it may be worth, after choosing butterfree, to disable the On Error Resume Next, then choose Charizard and see if any errors come up.

  8. #8
    Registered User
    Join Date
    12-28-2017
    Location
    North Carolina
    MS-Off Ver
    2016
    Posts
    13

    Re: ComboBox Doesn't Show Values When Made Visible

    I agree that it is weird this is acting different between the 2 versions. I placed a stop where you mentioned just before choosing Charizard again after Butterfree, but that didn't seem to populate the dependent box.

  9. #9
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: ComboBox Doesn't Show Values When Made Visible

    The stop was just so you could use F8 to follow each step, to make sure the code was running through the steps...

    Potential workaround if the previous post does not help us find anything...

    Comment out:
    Please Login or Register  to view this content.
    Go to developer tab, select design mode, right-click on the dependent list combobox, select format control, and on the Properties tab, select move and size with cells.
    This will make it hide when you hide the row, but the box itself is actually not "hidden" just not visible because the height is 0. That way it is not hidden through code and may function better.

  10. #10
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: ComboBox Doesn't Show Values When Made Visible

    Another possibility is that something in the populating or unhiding is causing the event to trigger more than once... Start the sub with Application.EnableEvents = False (after Dim statements) and then at the end put it back to true (just before End Sub)

  11. #11
    Registered User
    Join Date
    12-28-2017
    Location
    North Carolina
    MS-Off Ver
    2016
    Posts
    13

    Re: ComboBox Doesn't Show Values When Made Visible

    That worked perfectly! And because we just set to move and size with cells I was able to just remove the .Visible = True portion of the code as well. Still a little confused as to why the previous option was not able to work, but regardless. Thank you again!

  12. #12
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: ComboBox Doesn't Show Values When Made Visible

    My pleasure

    Please remember to mark the thread as solved? Thanks!

  13. #13
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: ComboBox Doesn't Show Values When Made Visible

    @ Arkadi - Thanks!

+ 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] range command doesn't show values when hovering cursor
    By pongmeister in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-07-2017, 09:12 PM
  2. need help to lock the shape and made it visible in printing
    By rinadimayuga in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-07-2015, 05:13 AM
  3. Filter excel with values populated in combobox and show result
    By teodormircea in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-09-2013, 11:24 AM
  4. Replies: 0
    Last Post: 01-25-2013, 07:13 PM
  5. Make text visible when entry made in another cell
    By lilraskle in forum Excel General
    Replies: 1
    Last Post: 01-27-2011, 01:19 PM
  6. Autoshape made Visible?
    By iluvfnky in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-07-2010, 08:05 AM
  7. Replies: 2
    Last Post: 08-10-2010, 10:14 AM

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