View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
akoobra[_2_] akoobra[_2_] is offline
external usenet poster
 
Posts: 1
Default Using loop for selection macro

Hi all

I am having trouble automatically stopping this macro. I can run it
and then end but would prefer to have it stop automatically.

Do
ActiveCell.Columns("A:A").EntireColumn.Select
Selection.Find(what:="TL", After:=ActiveCell, LookIn:=xlValues,
LookAt _
:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
False).Activate
ActiveCell.Range("A1:U1").Select
Selection.Cut
ActiveCell.Offset(-1, 10).Range("A1").Select
ActiveSheet.Paste
ActiveCell.Offset(1, 0).Rows("1:1").EntireRow.Select
Selection.ClearContents
Selection.Delete Shift:=xlUp
Loop


End Sub

Any help would be appreciated.

Richard