Use Git to keep every version of your scripts and Excel macros, so you can always go back to one that worked.