Running code has a different result than debugging code

  • Thread starter Thread starter sqlguy
  • Start date Start date
S

sqlguy

Guest
I have the following code:

If Directory.Exists("Teams") Then
Directory.Delete("Teams", True)
End If

If Not Directory.Exists("Teams") Then
InitialFileSetup()
End If

Now if I run the code I expect the routine InitialFileSetup to run as I am deleting the folder (directory). When I run F10 thru the code it works as expected. If I run the code F5 it does not run the routine. It seems that the delete when running the code (F5) the code continues before the actual delete is actually complete.

BTW this code is only there during the developing of the app as I was going to the folder and manually deleting the folder and thought this code would stop me from having to do this each execution.



Lloyd Sheen

Continue reading...
 
Back
Top