V
Viswanath Tumu
I am encountering a situation where my visual basic for
applications code is running too fast, i.e., it is not
waiting until the previous part of the code is completed
before moving to the next line. For example, in line 1, I
am issuing code to create a folder and in line 2, I am
issuing code to access the foler created at line 1 -
however, the code is jumping to line 2 before line 1 has
completed its job of creating a new folder, with the
result that I am receiving a Folder not found error which
should not arise had the code waited for line 1 to
complete before executing line 2. I tried to include
the 'Wait' method of a few seconds delay between line 1
and 2 but it still does not work frequently. Why is this
happenning? Is there a way to make the code to go slow,
to go one line at a time? Appreciate any comments.
applications code is running too fast, i.e., it is not
waiting until the previous part of the code is completed
before moving to the next line. For example, in line 1, I
am issuing code to create a folder and in line 2, I am
issuing code to access the foler created at line 1 -
however, the code is jumping to line 2 before line 1 has
completed its job of creating a new folder, with the
result that I am receiving a Folder not found error which
should not arise had the code waited for line 1 to
complete before executing line 2. I tried to include
the 'Wait' method of a few seconds delay between line 1
and 2 but it still does not work frequently. Why is this
happenning? Is there a way to make the code to go slow,
to go one line at a time? Appreciate any comments.