Dr. Demento
Well-known Member
- Joined
- Nov 2, 2010
- Messages
- 618
- Office Version
- 2019
- 2016
- Platform
- Windows
Recently, my group policies shut me out of using personal.xlsb. I have a work-around of copying all pertinent code from personal.xlsb into a new macro-enabled workbook and run it from there. Unfortunately, this is very time consuming to find all the necessary subs and functions to run a macro AND I have to do this each time I have a new project or each time Excel is shut down.
My current solution is to export the necessary modules into a folder as I step thru, but I'm looking for a slicker and more comprehensive way to do this. On issue is when I copy the entire module, I wind up copying extraneous functions/subs that VBA then makes sure I have all the supporting subs as well.
What I'm hoping to do is create a sub that goes thru each sub and function, line by line, capturing the name of the parent sub/fx, and then all subsequent calls to other child/supporting subs/fx, as many layers as there are. I understand there's no native way to do this.
My initial thoughts are to:
Does this approach seem feasible? I realize I'm missing some steps but I'm kind of scrambled at the moment. I'm looking at over 3000 sub/fx, so updating each one is probably not in the cards.
Thoughts or suggestions??
Thanks y'all.
My current solution is to export the necessary modules into a folder as I step thru, but I'm looking for a slicker and more comprehensive way to do this. On issue is when I copy the entire module, I wind up copying extraneous functions/subs that VBA then makes sure I have all the supporting subs as well.
What I'm hoping to do is create a sub that goes thru each sub and function, line by line, capturing the name of the parent sub/fx, and then all subsequent calls to other child/supporting subs/fx, as many layers as there are. I understand there's no native way to do this.
My initial thoughts are to:
- Compile a list of all subs and functions within personal.xlsb (done, thanks to Chip Pearson's excellent code).
- Loop thru each module / each line of code to identify the name of the any matches against the comprehensive list of sub/fx
- Capture module.sub/fx name into a dictionary
Does this approach seem feasible? I realize I'm missing some steps but I'm kind of scrambled at the moment. I'm looking at over 3000 sub/fx, so updating each one is probably not in the cards.
Thoughts or suggestions??
Thanks y'all.