In my program I have some calls that when I put message box between them (i was just debugging) it works fine. Without the message box it screws up. I tried using a Delay instead the code for my delay is
However, this doesn't solve the problem. I've even tried setting the integer value for the delay to a longer time, but that doesn't help either. How can I affect the program the way the message box does so the I can be sure my program works correctly?Code:Private Sub Delay(ByVal pt As Integer) Dim pausetime, Start pausetime = pt ' Set duration. Start = Timer ' Set start time. Do While Timer < Start + pausetime DoEvents ' Yield to other processes. Loop End Sub




Reply With Quote