[AccessD] How to automatically add "Option Explicit" to existing code modules

Darryl Collins Darryl.Collins at iag.com.au
Wed Nov 10 17:58:44 CST 2010


_______________________________________________________________________________________

Note: This e-mail is subject to the disclaimer contained at the bottom of this message.
_______________________________________________________________________________________


Hi folks,

"How to add "Option Explicit" to existing code modules"

I am not optimistic about this one as a Google search was fairly fruitless, although I did find one tool suite that claimed to do this, but is is $200+ for a single user license so I lost interest at that point.  Maybe I am not searching with the best keywords.

I am working on databases largely built by others and none of them use "Option Explict".  As a result there are dozens of little code errors that reveal themselves when explict is turned on. 

Of course the first thing I do is turn this option on, but that only applys to any new modules added.  Clearly I can manually paste in 'Option Explicit' into every existing form, report & code module, but there are hundreds of the little buggers and I would prefer not to have to do this manually.

Does anyone has some sneaky cheeky code that will check for option explict and write it into the form/module etc if it is missing?  I would of thought this would have been a fairly useful thing to do - and a standard option to have from the VBE, but hey, what do I know :)

cheers
Darryl
_______________________________________________________________________________________

The information transmitted in this message and its attachments (if any) is intended 
only for the person or entity to which it is addressed.
The message may contain confidential and/or privileged material. Any review, 
retransmission, dissemination or other use of, or taking of any action in reliance 
upon this information, by persons or entities other than the intended recipient is 
prohibited.

If you have received this in error, please contact the sender and delete this e-mail 
and associated material from any computer.

The intended recipient of this e-mail may only use, reproduce, disclose or distribute 
the information contained in this e-mail and any attached files, with the permission 
of the sender.

This message has been scanned for viruses.
_______________________________________________________________________________________




More information about the AccessD mailing list