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
when copying a range butCode:Range("A2:Z1000").Select Selection.Copy Sheets("DestinationSheet").Select Range("A1").Select Selection.Paste
So when determining the address of an entire Range you write something likeCode:Range("A2:Z1000").Copy Sheets("DestinationSheet").Range("A1")
where 1 stands for the columnnumber in which in every row always a value is entered.Code:With Sheets("Sheet1") .Range("A2:Z" & .Cells(.Rows.Count, 1).End(xlUp).Row).Copy Sheets("DestinationSheet").Range("A1") End With




Reply With Quote
Bookmarks