+ Reply to Thread
Results 1 to 7 of 7

Sheet Change Event Fails "SOMETIMES" - Dropdown Box Search

  1. #1
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    2007 Enterprise
    Posts
    4,609

    Sheet Change Event Fails "SOMETIMES" - Dropdown Box Search

    .
    The following works 99% of the time - occassionally it will fail and requires a closing / reopening of the workbook.

    Please review and advise if there is a better way of accomplishing the goal.

    Two dropdowns ( B3 & C3 ) attached to the Sheet_Change event. B3 creates a query for Database Sheet Col E ...
    C3 creates a query for Database Sheet Col F ...

    As shown, the overall goal is to have two individual dropdowns that will initiate a query - one for Col E and the other for Col F.


    Thank you for looking .

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Logit; 02-12-2019 at 02:33 PM.

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010
    Posts
    4,890

    Re: Sheet Change Event Fails "SOMETIMES" - Dropdown Box Search

    I don't know if this will solve the 99% problem but give it a try. I've made the code shorter.
    Please Login or Register  to view this content.
    Last edited by Mumps1; 02-12-2019 at 02:57 PM.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    2007 Enterprise
    Posts
    4,609

    Re: Sheet Change Event Fails "SOMETIMES" - Dropdown Box Search

    .
    Mumps1

    Thank you for your assistance. Love the re-worked code. Works great !

    Cheers !

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010
    Posts
    4,890

    Re: Sheet Change Event Fails "SOMETIMES" - Dropdown Box Search

    You are very welcome. Hopefully, it will be 100%.

  5. #5
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    2007 Enterprise
    Posts
    4,609

    Re: Sheet Change Event Fails "SOMETIMES" - Dropdown Box Search

    .
    Still looking for suggestions why the macro doesn't work 100% of the time .

    Thank you.

  6. #6
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    UK
    MS-Off Ver
    2010 primarily
    Posts
    3,042

    Re: Sheet Change Event Fails "SOMETIMES" - Dropdown Box Search

    What exactly happens when it fails?
    Rory
    Days when we raged, we flew off the page
    Such damage was done

  7. #7
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    2007 Enterprise
    Posts
    4,609

    Re: Sheet Change Event Fails "SOMETIMES" - Dropdown Box Search

    .
    My apologies for not describing the error. Duh !
    I am embarassed for not adhering to "Forum Posting for Dummies 101".


    When selecting the Subcontractor from the drop downs, it will at first not retrieve the query. The user has to select a different Subcontractor from the dropdown, then
    reselect the original choice again.

    It occurs on both drop downs.

    The intial design had the "active cell" remain as the drop down that was selected. That is, if the user selected B3 drop down ... after selecting a choice from B3 the focus
    would remain on B3. This was changed, so after making a selection from either drop down, the focus would immediately shift to E3 .. taking the focus off of the drop downs.
    (The attached file does not have this change). Intially, taking the focus off either of the drop downs worked. But then the same issue arose - again, intermittently.

    It's like the program doesn't initially recognize a selection has been made from the drop down.

    Any ideas ?

+ 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