There is a difference between the DoEvents and RefreshScreen methods that need some attention. DoEvents should be able to allow the program to respond to Windows messages (like closing the program window) but it does not. Also, (depending on your implementation) DoEvents might be an expensive call to make in every iteration of a tight loop. Typically a loop is tight because you want the speed and adding DoEvents may have serious consequences. The routine below could be added to provide a method to call on every iteration, but yet only call DoEvents somewhat less periodically (like every 2 seconds)....
Define CatchEventTiming As Decimal
Method CatchEvents()
If Timers.TickCount() > CatchEventTiming Then
Shell.RefreshScreen()
Shell.DoEvents()
CatchEventTiming = Timers.TickCount() + 2000
End If
End Method
Could you look into why RefreshScreen is needed to avoid the "Application Not Responding" message? Or, is it that RefreshScreen is a better method to call in these circumstances? In the example above, RefreshScreen can be used alone, while DoEvents can not....