LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 77
Default I need to stop this Loop

Hi all

This works but I have to press Esc key to stop the macro. I've been reading
up on loops but need more time to work with them.

Sub ChangeNames()

Sheets("Sheet2").Select
Application.Goto Reference:="R2C5"

Do
Cells.Find(What:="Test1", After:=ActiveCell, LookIn:=xlValues, LookAt:=
_
xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext,
MatchCase:= _
False, SearchFormat:=False).Activate

Sheets("Tests htmls").Select
Application.Goto Reference:="R1C1"
Selection.Copy
Sheets("Sheet2").Select
ActiveSheet.Paste
Loop Until IsEmpty(ActiveCell.Offset(0, 0))

End Sub

I also have items in A2 to A37 "Tests htmls" I'd like to change in sheet2
col E, is there a way to do this all in one macro, rather than have 37
macros.

Thanks in advace

Dave


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stop Loop pjd33 Excel Programming 4 May 24th 07 05:21 PM
Do Loop doesn't stop [email protected][_2_] Excel Programming 5 May 22nd 07 07:32 PM
Stop Loop Robert[_30_] Excel Programming 2 January 17th 07 01:34 PM
how to stop a loop L775 Excel Programming 6 November 29th 04 08:37 PM
HELP!!!! Can't stop a loop (NOT an infinite loop) TBA[_2_] Excel Programming 3 December 14th 03 03:33 PM


All times are GMT +1. The time now is 09:08 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"