Hi all...back for some more sterling advice
I have a project that opens another 20 workbooks (all with references to a main workbook). So under the VBE I have 20 separate projects.
Within these project, there is heavy usage of hard coded ranges that I would now like to replace with named ranges e.g.
$A1$Z54
B7:B12
$F$7:$F$12
When I say heavy usage - I mean hundreds! Spread across 23,000+ lines of code.
Is there a way to build a macro that will go through every line of code and do a LIKE operation or a REGEX operation so that I can capture all of these hard coded references into an array? If I get to this stage I am sure I can then take it further to dump the results into a worksheet :
REF....BOOK.........MODULE.....LINE....VALUE
1......Book1.xls....VB_Main....56......Sheet1!$A7:$Z15
2......Book1.xls....VB_Main....59......Sheet2!$B$7:$Z14
3......Book2.xls....VB_Func....5.......wks.Range("A7")