Need help with modify this macro to copy.
since that was too hard to debug and correct yourself, I will post the
tested routine
Sub testme()
Dim myCell As Range
Dim NextEmpty As Range
Set myCell = ActiveSheet.Range("a16")
Do
If myCell.Value = "" Then
Set NextEmpty = myCell
Exit Do
Else
Set myCell = myCell.Offset(1, 0)
End If
Loop
Range("A16", NextEmpty.Offset(-1, 0)).EntireRow.Copy _
Destination:=Worksheets(2).Range("A1")
End Sub
--
regards,
Tom Ogilvy
"Calle" wrote in message
...
Hi Tom!
I get an error message with these to lines:
Range("A16", NextEmpty.offset(-1,0).EntireRow.copy _
Destination:=Worksheets(2).Range("A1")
|