I have a large workbook with several macros that refreshes all of the data for a specific year. I have some code on my Dashboard that calls the main Refresh macro when a specific cell is changed on my Dashboard sheet. If I just click the run button in the VBA editor for the main Refresh macro, the code runs perfectly with no problem every time. However, if I run the macro from the code on the Dashboard sheet, it (sometimes) errors out with a Subscript out of range error. Sometimes it runs fine all the way through, and sometimes it errors out, seemingly randomly.
It always errors out on this line:
Here is my code on the Dashboard sheet:
And here is my main code:
Bookmarks