Quote Originally Posted by Kenneth Hobs View Post
snb's example was to show how findstr can help. Change MsgBox.Exec to MsgBox .Exec in post #21.

I can not duplicate your system restore issue. When a macro "hangs" and ESC key presses or Break key does not abort it, the 3 finger solute (Alt+Ctrl+Del, Task Manager, Kill) is the usual method to Kill the Excel instance. It is always best to run a macro like mine by itself with no other Excel files open. That is, at least until you know what to expect.

I can not duplicate your timing problem for those files. I did say it took a "long time" to run. My run with your files took about 44 seconds. Anything over 5 seconds is a long time to me. I like to see under one second but you wanted to get the character count / 65 for each match.

snb or I could show you how to modify his code to do what mine does, less the character count / 65.

I added an ESC key option. When you abort a macro like mine, it can leave an instance of Word that needs to be Killed via 3 finger solute before another run or you could get an OLE error.
Thank you very much for your time, effort, and commitment.

[CODE] a = aFFs(p & "*.doc", , True) [CODE]

I am getting a compile error for the above portion prompting "sub or function not defined" for "aFFs"