Search Module Content

N

Norbert Meiss

I want to search for specific strings in all modules (including Code behind
forms) of an Access project and output the module and sub or function name.
Is this possible with VBA, maybe from another Access project?
TIA,
Norbert Meiss
 
J

Jack Leach

Is this possible

Not easily, but there's a few things you can look up.

http://support.microsoft.com/kb/209869
This link gives an example of how to output "all modules" to a text file.
Unfortunately, "all modules" doesn't include forms.

Chip Pearson has an excellent reference for working with the vba project
text, except its written for Excel rather than access. Shouldn't been too
much to change around though.

http://www.cpearson.com/excel/vbe.aspx

The KB article code I use as a dev tool, but you would have to search the
text file and write your own function to get the sub/function names from it.
I've never used the examples that Chip gives, but I would assume if it can be
done, that would be the place to look.

hth
--
Jack Leach
www.tristatemachine.com

"I haven't failed, I've found ten thousand ways that don't work."
-Thomas Edison (1847-1931)
 
N

Norbert Meiss

Thanks, good point to start with.

Jack Leach said:
Not easily, but there's a few things you can look up.

http://support.microsoft.com/kb/209869
This link gives an example of how to output "all modules" to a text file.
Unfortunately, "all modules" doesn't include forms.

Chip Pearson has an excellent reference for working with the vba project
text, except its written for Excel rather than access. Shouldn't been too
much to change around though.

http://www.cpearson.com/excel/vbe.aspx

The KB article code I use as a dev tool, but you would have to search the
text file and write your own function to get the sub/function names from it.
I've never used the examples that Chip gives, but I would assume if it can be
done, that would be the place to look.

hth
--
Jack Leach
www.tristatemachine.com

"I haven't failed, I've found ten thousand ways that don't work."
-Thomas Edison (1847-1931)
 
T

Tom Wickerath

Have you tried MZTools for VBA (http://www.mztools.com/v3/mztools3.aspx)?
This includes a search feature that allows one to search Project Group. You
can copy the results to your clipboard, and paste into a new text file.

Other alternatives include:

Find & Replace: http://www.rickworld.com/products.html
Speed Ferret: http://www.moshannon.com/speedferret.html
Ucora: http://www3.bc.sympatico.ca/starthere/findandreplace/ (Free)
V-Tools: http://www.skrol29.com/us/vtools.php (Free)


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
__________________________________________
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top