+ Reply to Thread
Results 1 to 4 of 4

Reset two MUTUALLY dependent drop down lists in Excel while avoiding any fatal loop crash

  1. #1
    Registered User
    Join Date
    11-27-2015
    Location
    Sao Paulo, Brazil
    MS-Off Ver
    MS Office 365
    Posts
    42

    Question Reset two MUTUALLY dependent drop down lists in Excel while avoiding any fatal loop crash

    I'm preparing an Excel report schedule that contains some filters so the user can restrict the scope they want to see, and two of those filters are YEAR and MONTH, as the couple screen shots below:

    Year_Drop_Down.png

    Month_Drop_Down.png

    I wrote a named formula into Data Validation so every time a user selects a specific year on B3, the MONTH drop down below will show only those months related to that particular year. Conversely, every time a user selects a specific month on B4, the YEAR drop down above will show only that year related to that particular month that was selected.

    And then I wrote that basic VBA code below so that every time the YEAR drop down on B3 is erased, if there's anything already selected on the MONTH drop down on B4 it will get automatically reset as well, in order to avoid inconsistencies of what is selected between the two cells (i.e.: 2021 is selected in YEAR and Mar/2020 is already selected in MONTH, which would generate a report error).

    Please Login or Register  to view this content.
    However, I also need the other way around to happen too: reset what's on the YEAR filter in B3 every time an user erases what's on the MONTH filter in B4.

    I tried tweaking the above code to make that happen, but when I try to run it I either get a VBA code error or a fatal loop that ends up crashing and closing Excel.

    Is it possible to achieve what I want? And if so, what would be the best coding route? I'm really a newbie with VBA, so.....

    Thanks in advance

    P.S.:
    I also posted the same question on a couple other discussion forums:
    https://stackoverflow.com/questions/...ng-a-fatal-loo
    https://techcommunity.microsoft.com/...le/m-p/2744523

  2. #2
    Spammer
    Join Date
    10-23-2012
    Location
    Adelaide, Australia
    MS-Off Ver
    Excel 2003, Office 365
    Posts
    1,237

    Re: Reset two MUTUALLY dependent drop down lists in Excel while avoiding any fatal loop cr

    Try;

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-27-2015
    Location
    Sao Paulo, Brazil
    MS-Off Ver
    MS Office 365
    Posts
    42

    Re: Reset two MUTUALLY dependent drop down lists in Excel while avoiding any fatal loop cr

    Thank you!

  4. #4
    Spammer
    Join Date
    10-23-2012
    Location
    Adelaide, Australia
    MS-Off Ver
    Excel 2003, Office 365
    Posts
    1,237

    Re: Reset two MUTUALLY dependent drop down lists in Excel while avoiding any fatal loop cr

    No problems.

+ 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] How to reset multiple drop-down lists that are dependent on each other?
    By rowena229 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-10-2021, 06:13 PM
  2. Google Sheets script to Excel VBA, dependent drop down lists.
    By Lucko4Life in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-04-2019, 12:50 AM
  3. [SOLVED] Excel Dependent drop down lists
    By JAKIV in forum Excel General
    Replies: 4
    Last Post: 02-14-2018, 06:38 PM
  4. Replies: 5
    Last Post: 02-12-2015, 01:18 PM
  5. Dependent Drop Down lists reset
    By allheilyb1 in forum Excel General
    Replies: 13
    Last Post: 10-22-2014, 08:07 PM
  6. [SOLVED] Dependent Drop Down Lists, Data Validation, Reset Dependents
    By daxlyon in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-12-2013, 11:15 AM
  7. [SOLVED] How to Reset Dependent drop downs
    By ertweety in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-18-2012, 06:10 PM

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