I have a very large piece of code written in VBA (> 50,000 lines - numerous modules). There is one interesting array for me, and I would like to find all the conditions under which the value of any element of this array changes. Values can change in any module. Running a script line by line is not the most efficient option due to the size of the code.
I am looking for the best ways to solve this problem. Two ways that come to my mind are to programmatically set a breakpoint (which I'm not sure what can be done) or programmatically insert an if block after each assignment, which somehow warns me that the value has changed. (Not recommended).
So my question comes down to the following:
- Is it possible to programmatically set breakpoints in VBA code?
- If the answer to the above question is No , what is an effective way to solve this problem?
UPDATE:
Thanks for the comments / answers. As I meant, I am interested in the smallest modification of the current code (i.e., the insertion of if-blocks, etc.) and the one most interested in the idea of breaking. I would like to know if this can be done.
source
share