I'm working with a very complicated Excel template, and I've been getting reports that the more copies of the same template are open the more it becomes exponentially slow.
I did some tests and noticed that the code
Worksheet_SelectionChange
written in the VBA code for a sheet called "Deliverables" sheet gets triggered if I'm on a new file and I do modifications to the second file, which does not make sense to me, but it does happen.
Before you guys jump on me, i already googled this, and I have not found a complete list, so I'm hopping your experience will help me.
I already have a validation function like the one below that would handle that situation, but I was wondering:
Is there an extensive list of triggers that can be activated while a different file is selected? (i just want to make sure I catch all situations)
This is the check I currently use:
thisworkbook.name <> activeWorkbook.name
Update:
I did some tests and was able to pin point what and when was changing:
File 1 is the initial template, File 2 is an empty file with no macros, It just contains an auto formated table.
In file 1 I have conditional formatting with this formula:
=AND(IsColored=0,COLUMN()=CELL("col"))
which colors currently selected column, same for rows.
If in file 2, the one with no macros, i do a copy paste, the conditional formatting in file 1 updates, and applies conditional formatting according to file 2 last updated cell
.