View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
FSt1 FSt1 is offline
external usenet poster
 
Posts: 3,942
Default cut and paste with loop macro

hi
I think you have left out a WHOLE lot of code. per the code you have
posted.... the reason it only does it once is because you dont have a loop.
and per my experience... cut and paste in a loop will crash your macro due to
memory errors. better to use variables and avoid the clipboard alltogeather.
cut and paste ...once or twice is ok...but not in a loop perticularly is the
data has thousands of lines.
Post ALL of your code so that we can get a better picture of what is
happening. perticularly about the "check boxes" which the code you posted
does not address.

Regards
FSt1

"Nic" wrote:

I am very novice....so I have not found enough "simple" info to solve this
problem....
I need a macro that searches out the rows labelled "Archive" (in Column E)
(in the "Master" sheet), cuts and pastes the whole row to another sheet,
labelled "Archive". But the formula stops after one paste and only searches
out cells below the active row. It also does not clear the control check
boxes that I've got in (every second column) N through AB (8 total). I'm
trying to totally automate this workbook so a macro is preferable.

I do not want the empty rows deleted or it will mess up my control boxes, I
just re-sort them and the empty rows go to the bottom.
Thanks


Cells.Find(What:="Archive", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Rows("1:1").EntireRow.Select
Selection.Cut
Sheets("Archive").Select
ActiveSheet.Cells(Rows.Count, 1).End(xlUp) _
.Offset(1, 0).Select
ActiveSheet.Paste
Sheets("Master").Select