Results 1 to 27 of 27

Looping Problem

Threaded View

Spasm Looping Problem 07-08-2011, 08:30 PM
Leith Ross Re: Looping Problem 07-08-2011, 09:12 PM
Spasm Re: Looping Problem 07-08-2011, 09:46 PM
Mordred Re: Looping Problem 07-08-2011, 10:18 PM
Spasm Re: Looping Problem 07-08-2011, 10:28 PM
Mordred Re: Looping Problem 07-08-2011, 10:41 PM
Leith Ross Re: Looping Problem 07-08-2011, 10:50 PM
Spasm Re: Looping Problem 07-08-2011, 11:19 PM
Leith Ross Re: Looping Problem 07-08-2011, 11:22 PM
Spasm Re: Looping Problem 07-08-2011, 10:59 PM
Spasm Re: Looping Problem 07-08-2011, 11:04 PM
Spasm Re: Looping Problem 07-08-2011, 11:23 PM
Spasm Re: Looping Problem 07-08-2011, 11:37 PM
royUK Re: Looping Problem 07-09-2011, 11:11 AM
Marcol Re: Looping Problem 07-09-2011, 12:04 PM
Spasm Re: Looping Problem 07-09-2011, 01:07 PM
Spasm Re: Looping Problem 07-09-2011, 01:33 PM
Spasm Re: Looping Problem 07-09-2011, 01:52 PM
shg Re: Looping Problem 07-09-2011, 02:08 PM
Spasm Re: Looping Problem 07-09-2011, 02:18 PM
Mordred Re: Looping Problem 07-09-2011, 01:43 PM
Mordred Re: Looping Problem 07-09-2011, 02:10 PM
Mordred Re: Looping Problem 07-09-2011, 02:16 PM
Mordred Re: Looping Problem 07-09-2011, 02:20 PM
Spasm Re: Looping Problem 07-09-2011, 02:25 PM
Marcol Re: Looping Problem 07-09-2011, 02:28 PM
Spasm Re: Looping Problem 07-09-2011, 02:32 PM
  1. #1
    Registered User
    Join Date
    07-07-2011
    Location
    Mumbai
    MS-Off Ver
    Excel 2003
    Posts
    36

    Looping Problem

    hi...

    i use the following code to update some files.

     Sub Macro4update()
          Cells(2, 1).Select
        Do While IsEmpty(ActiveCell.Offset(0, 0)) = False
          Range(ActiveCell, ActiveCell.Offset(0, 7)).Select
         Selection.Copy
        Workbooks.Open Filename:=Range(ActiveCell, ActiveCell.Offset(0, 0)).Value
        On Error GoTo ErrHandler:
        ActiveCell.Offset(1, 0).Select
        ActiveSheet.Paste
        Application.DisplayAlerts = False
        ActiveWorkbook.Save
        ActiveWindow.Close
    Label1:
        ActiveCell.Offset(1, 0).Select
           Loop
    ErrHandler:
          Resume Label1
    End Sub
    When it reaches the last row, it keeps on looping.
    i want it to stop after the last row is done......

    Please help...

    Thanks






    Additional details:-

    the cell values in the first column are the names of the files stored on my hard disk,
    if a file is not present on my hard disk for upgradation, it will give error...
    hence i m forced on using the error handler,
    but its messing up the loop.

    Plz help
    Last edited by Spasm; 07-09-2011 at 02:29 PM.

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