Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using loop for selection macro
you don't have a way to stop it.
do then loop. you need to put in do until.....something. or loop until or while....something. when something happens the code will exit the loop. -----Original Message----- 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 . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Date selection loop | Excel Programming | |||
Help With loop macro?? | Excel Programming | |||
I Need Help with my loop macro | Excel Programming | |||
Loop macro help. | Excel Programming | |||
Loop macro help. | Excel Programming |