+ Reply to Thread
Results 1 to 2 of 2

Problem with do loop - does not appear to be exiting

  1. #1
    Registered User
    Join Date
    04-29-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    2

    Problem with do loop - does not appear to be exiting

    Hello, I am new to VBA and feel this might be quite a simple issue - but I just don't have a clue what to do.
    When I put this bit of code into my function, when I try and run it Excel (2003) gets stuck and I have to force close Excel.

    Please Login or Register  to view this content.
    Any help would be much appreciated.

  2. #2
    Valued Forum Contributor
    Join Date
    06-16-2006
    Location
    Sydney, Australia
    MS-Off Ver
    2013 64bit
    Posts
    1,394

    Re: Problem with do loop - does not appear to be exiting

    Normally this type of code is designed to loop through a range of cells. In your case, you are not looping through a range, you are always pointing to the same cell, which is active cell. If you are trying to work down a column, then add this below your "end if" statement.

    Activecell.offset(1,0).select

+ 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