Paste from other sheets to below current text

J

Jeff S.

I'm trying to copy text from other sheets (Dir) and post below current text
(Temp) if there is any. I keep getting errors. What am I doing wrong?

If DirectorBox = True Then
Application.CutCopyMode = False
Worksheets("Dir").Activate
ActiveSheet.UsedRange.Copy
Worksheets("Temp").Activate
If Range("A1") <> "" Then
Range("A1").End(xlDown).Offset(1, 0).Select
Else
ActiveSheet.Cells(1, 1).Select
End If
ActiveSheet.Paste
End If
 
M

Mike H

Jeff,

Maybe a bit simpler

If DirectorBox = True Then
Worksheets("Dir").UsedRange.Copy
lastrow = Sheets("Temp").Cells(Cells.Rows.Count, "A").End(xlUp).Row
Worksheets("Temp").Range("A" & lastrow + 1).PasteSpecial
End If

Mike
 
D

Don Guillett

or
If DirectorBox = True Then
with sheets("temp")
lastrow = .cells(Rows.Count, "A").End(xlUp).Row+1
Worksheets("Dir").UsedRange.Copy .cells(lastrow,"a")
end with
end if
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top