At the load of a form I need to fill some data, but in order to do it correctly the program must wait a sec or two.
So I decided to use the typical Timer sample:
VB Code:
Dim dTimer As Double dTimer = Timer waitTime = 1 Do While Timer < dTimer + waitTime DoEvents Loop
Now the problem is that if I close the program while the program's still inside the Do While the form opens again and gives an error. Any help? Thanks in advance.




Reply With Quote