Re: Application Focus Issue
***Possible Solution***
I have added DoEvents Commands to my file read loop and it seems to be working. Will know for sure tomorrow morning.
Re: Application Focus Issue
Depending on how quickly the loop fires, you don't want DoEvent firing every time. Create a counter, and add to it. Fire DoEvent every MOD 1000, or MOD 100. You want the HIGHEST number that keeps the app alive.
Firing DoEvent events every time will actually slow your app down.
Code:
Dim ctr as Long ' > 32K possible
ctr =1
for each l in lines
ctr=ctr+1
if ctr Mod 100 = 0 Then DoEvents ' fires every 100 times, ONLY
' do other processing here
next