>>Hi All:
>>
>>We have inherited the support of a couple of dozen Excel spreadsheets. These all have a bunch of VBA methods.
>>
>>Is there some way we can open the spreadhseets and extract the method code so that we can build a big code database that can be searched
>>
>>For example ..... Which methods in which spreadsheets reference a particular drive mapping???
>> Which methods in which spreadsheets use a specific DSN
>> etc.
>>
>>How can we accumulate the VBA code to do those kinds of searches?
>>
>
>I was sure I'd written something about this, but I can't find it. Regardless, check out the Modules collection in VBA.
>
>Tamar
Thanks for the advice. If you have any pointers or links on how to use this it would help a great deal. So far I've tried
oXl = CREATEOBJECT('excel.application')
oWb = oXl.wookbooks.open(GETFILE())
? oXl.modules.count --> 0
? oXl.application.modules.count --> 0
? oWb.modules.count --> 0
? oWb.application.modules.count --> 0
Google hasn't been especially useful for me either.
Anything use can provide will be useful.
Thanks so much.........Rich