+ Reply to Thread
Results 1 to 4 of 4

Loop without Do compile error

  1. #1
    Forum Contributor
    Join Date
    12-03-2009
    Location
    Providence RI
    MS-Off Ver
    Excel 2007, Excel 2010
    Posts
    260

    Loop without Do compile error

    Hello,

    I can't seem to figure this one out and I don't know why. I have a dozen or so loops just because they are looping until the 3rd party app screen updates. These are no problem and I have used many of them before and it works fine. However, my main loops arent letting me loop for some reason and I can't seem to figure out why. I know some of this code will not make sense because it is a 3rd party app...unfortunately this makes some of my code a bit messier than I would like but either way. The error comes up with the 2nd to last loop. I'm going to skip the start of the code, but all variables are assigned and there is no do or loop commands above this. I have checked all loops inside the original loops and verified they start and end.

    All of the Do Loops between are purely for waiting on the screen to update which is why they basically do nothing besides waste time.

    What am I missing here? Sorry I know this VBA 101 type question

    Please Login or Register  to view this content.
    Last edited by Dulanic; 09-09-2010 at 12:22 PM.

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Loop without Do compile error

    You're missing an "End If" to end the condition

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    12-03-2009
    Location
    Providence RI
    MS-Off Ver
    Excel 2007, Excel 2010
    Posts
    260

    Re: Loop without Do compile error

    LOL I knew it was something simple.... I looked through it like 15 times and I just couldnt find my error. Thanks!

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Loop without Do compile error

    If you indent your code, it makes problems like this much easier to find.

    http://www.oaltd.co.uk/Indenter/Default.htm
    Entia non sunt multiplicanda sine necessitate

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1