Link to home
Start Free TrialLog in
Avatar of Milewskp
MilewskpFlag for Canada

asked on

How to search for strings in VBA Ccode

How can I use VBA Code to check for the string:
   Const ThisProcName as string = "XXX"
in every procedure of every module of my mdb, and return the name of the first module/ procedure that doesn't have it?
NOTE: 'XXX' is the name of each procedure.
SOLUTION
Avatar of Chris Bottomley
Chris Bottomley
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Milewskp

ASKER

hi chris,
<what are you trying to do ... searh every module and every sub in each module to make sure the string "XXX" is referenced in the subs?  If so I assume you include functions in the scenario?>
Yes, every procedure, including subs, functions and event procedures.

ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks Chris,
That's what I was looking for. Great link too!