The DeEvent function yields execution to the operating system so it can process other events, The operating system then processes all of the events in its queue then returns control to the Subroutine or Function that called DoEvents.
One comman use for DoEvents is inside a large loop so as to allow the user to cancel the loop, other wise your program is frozen intill the loop is complete
Its not allways the best way to yield to the operating system from a Function/Sub especialy if that Function/Sub can get called from somewhere else in which case things get unpreditable, also dont use it if other processes interact with your procedure.
Also the DoEvent function will return an integer that represents the number of open forms in your program.
There are better ways to yield to the operating system then the DoEvents, but that is just my opion.
Collin [sig][/sig]