In general, VB6 and VBA uses DoEvents to tell the processor to continue processing the messages in the message queue. It is used when an intensive processing operation is being done in the processor and so the UI of the program is still responsive to all other events.
Example: You are doing an intensive search algorithm, if you didn t add DoEvents the program may hang up till it finishes the search. On the other hand, if you add DoEvents (to the search loop let s say) the program does not hang up and still can handle all program events like (Cancel) canceling the search.
EDIT: I see it as DoEvents is more comprehensive than Repaint since it deals with all event types not only handling the flicker/Hangup of the UI.