+ 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
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    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, 2013
    Posts
    7,820

    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
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    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, 2013
    Posts
    7,820

    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
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    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
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,911

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

    What exactly happens when it fails?
    Rory

  7. #7
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    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)

Similar Threads

  1. [SOLVED] "ActiveWorkbook.Path" fails - triggers "Compile Error Object required"
    By Ochimus in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-15-2018, 02:58 PM
  2. "Worksheet_Change" fails if change is initiated from another sheet
    By skipro in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-22-2017, 07:47 PM
  3. [SOLVED] Why does the "CountIF" function fails on value "Monday Week 1"?
    By kashbg in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-02-2015, 03:24 PM
  4. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  5. Replies: 1
    Last Post: 07-10-2012, 12:36 PM
  6. How to have a Worksheet Change event Work if a cell says "ON"
    By trickyricky in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-09-2011, 10:07 PM
  7. [SOLVED] Application is already Calculating during a "Change" event
    By Dr Rubick in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-13-2005, 11:06 AM

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