What is it you're trying to do because in 99% of the cases it isn't necessary to SELECT a range when writing code.
It's obselete and slows down the execution.
You don't write
Code:
Range("A2:Z1000").Select
Selection.Copy
Sheets("DestinationSheet").Select
Range("A1").Select
Selection.Paste
when copying a range but
Code:
Range("A2:Z1000").Copy Sheets("DestinationSheet").Range("A1")
So when determining the address of an entire Range you write something like
Code:
With Sheets("Sheet1")
.Range("A2:Z" & .Cells(.Rows.Count, 1).End(xlUp).Row).Copy Sheets("DestinationSheet").Range("A1")
End With
where 1 stands for the columnnumber in which in every row always a value is entered.
Bookmarks