hi...
i use the following code to update some files.
When it reaches the last row, it keeps on looping.![]()
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
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![]()
Bookmarks