Re: Macro doesn't capture all data
- From: "tissot.emmanuel" <tissot.emmanuel@xxxxxxx>
- Date: Thu, 28 Jun 2007 12:27:24 +0200
Hi,
activecell.Offset(1, 0).Activate
I think you should delete one of these statement.
Regards,
Manu/
"MarkHear1" <markhearsum@xxxxxxxxx> a écrit dans le message de news:
1183025871.042432.74770@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello all,
I have written the code below, which appears to work ok, but it
doesn't capture all of the data that it should...i think this could be
because the macro is running too quickly and doesn't give its self
chance, is this true? Is there anyway I can fix the problem? Or is
this happening for another reason?
All help/suggestions will be greatly appreciated.
Many Thanks,
Mark
Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
Dim LOOPAMOUNT As Integer
pastecellnum = 1
TEXTROW = TextBox1.Value
Range("Sheet1!B65536").Activate
Selection.End(xlUp).Select
BOTTOMCELL = activecell.Row
RowCount = BOTTOMCELL - TEXTROW
Range("B" & TEXTROW).Select
For AbC = 1 To RowCount
If activecell.Interior.ColorIndex = xlNone Or
activecell.Interior.ColorIndex = 2 Then
activecell.EntireRow.Copy
Range("Outstanding!A" & pastecellnum).PasteSpecial
pastecellnum = pastecellnum + 1
activecell.Offset(1, 0).Activate
End If
activecell.Offset(1, 0).Activate
Next AbC
Application.ScreenUpdating = True
End Sub
.
- Follow-Ups:
- Re: Macro doesn't capture all data
- From: MarkHear1
- Re: Macro doesn't capture all data
- References:
- Macro doesn't capture all data
- From: MarkHear1
- Macro doesn't capture all data
- Prev by Date: Re: What is default property of name object
- Next by Date: Re: What is default property of name object
- Previous by thread: Macro doesn't capture all data
- Next by thread: Re: Macro doesn't capture all data
- Index(es):