LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Code is Running Too Fast

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.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macros Running Sometimes Slow Sometimes Fast bigV Excel Discussion (Misc queries) 0 June 9th 08 03:13 PM
running code mark New Users to Excel 3 March 14th 05 09:14 AM
Book on how to write VBA code in a fast/efficient manner? J S Excel Programming 3 November 26th 03 02:12 PM
running VB code Cath[_3_] Excel Programming 1 November 21st 03 05:09 PM
Running Code in an XLA from a Worksheet Chrissy[_4_] Excel Programming 6 October 11th 03 11:27 PM


All times are GMT +1. The time now is 08:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"