Activecell range copy
After putzing around for a while this is what I come up with.
This works because the active cell is in the CurrentRegion.
Dim curcell As Variant
Dim lastrow As Long
lastrow = Sheets("sheet2").Range("A" & Rows.Count).End(xlUp).Row
If lastrow < 1 Then lastrow = lastrow + 1
curcell = ActiveCell.Address ' anywhere in the current region
Selection.Resize(Selection.Rows.Count, Selection.Columns.Count).Select
Range(curcell).CurrentRegion.Copy Sheets("sheet2").Cells(lastrow, 1)
End Sub
--
AH
"Allan" wrote:
So heres what I'm Try to do.
Copy a range1 from sheet1 to sheet2 to first blank row Col "A".
The range1 from sheet1 is of variable size and may contain empty cells.
Also range1 may not be in the same place everytime on sheet1, but
I have the current cell address which is the first column and last row of
the range.
curcell = ActiveWindow.RangeSelection.Address
Maybe using .Resize to determine range size??
Thanks Allan
|