+ Reply to Thread
Results 1 to 3 of 3

Loop Problems

  1. #1
    Registered User
    Join Date
    03-10-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2003
    Posts
    13

    Loop Problems

    Hi i have started Writing a loop that will eventually copy the cells one by one depending on the if statement, i think that if i run it now, it should just do nothing even if the criteria is not met. But this does not happen, it just crashes excel instead.
    Please Login or Register  to view this content.
    Thats the loop
    thanks for the help

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Loop Problems

    When you say crash do you mean crash or does the code raise an error?

    Your loop is not updating anything other than the variable i

    So the test of vCelli will never alter. If it passes first time it will just continue looping.

    You need to update the variable references within the loop
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    03-10-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Loop Problems

    Ok Thanks a lot that fixed my problem by re-wrting the variable inside the loop, and yes it was the whole prgram that crashed i presume it just got stuck then. Cheers for the Help

+ 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