>how about DoEvents() .. can I add it also ? .. thanks Eric for the advice
DoEvents is often use in a looping structure when you want other controls to react (to let other events occur).
Consider the following example:
Dim x As Integer
For x = 1 To 5000
Label1.Caption = x
DoEvents
Next x
If you run it, you will see (if you read fast enough) every number between 1 and 5000. If you erase the DoEvents statement, you will only 5000 appears at the end of the structure.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com