Lines in modules
Hi, Mile-o-phile.....
The reason is related to an "intermittent" error we receive at my job. The error is basically, "VBA332.DLL has caused an invalid page fault," which causes instant ACCESS death. After hours of researching the VBA332.DLL headache, which Microsoft says is usually due to either a corrupt db or to using a reserved word in VBA code (not so in our cases), and of replacing the VBA332.DLL and of even reloading Microsoft Office, and of decompiling, and making an empty db and copying in all tables, forms, queries, etc, we found something interesting:
We copied our modules out to text files, and using Word, saw that an empty line (or two) appeared to contain spaces, instead of the usual CHR$(10) and CHR$(13) right at the beginning of the empty line. (Incidentally, the empty lines were placed into the code for readability.) When the "spaces" were removed manually from the "blank" lines, and then the fixed code was placed back into the modules, all worked wonderfully..... compiles succeeded and the VBA332.DLL kamikaze disappeared when the applications were processed.
So..... that is why we are interested in suggestions for something that can examine, find and replace as follows: (1) Read a module (2) Determine if a line is blank. (3) If the line is blank, determine if it contains spaces, as opposed to just a Linefeed / Carriage Return. (4) If it contains spaces, remove the spaces, leaving just the Carriage Return / Line Feed. (5) Replace the old line with the newly altered line. (6) Save the module.
Looking forward to your replay.......