Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a piece of code as below that works fine, but I can't find an
alternative that works, avoiding the two .Activate lines . I've tried with...end with, but it gives an error. Any suggestions? Dim bottomRow As Long bottomRow = Sheets("Scores").Cells(Rows.Count, 1).End(xlUp).Row Sheets("Results").Activate Sheets("Results").Range(Cells(3, 1), Cells(bottomRow,6)).Copy Sheets("Ladder").Range("b3").PasteSpecial Paste:=xlValues Sheets("Ladder").Activate Sheets("Ladder").Range(Cells(3, 2), Cells(bottomRow, 7)) _ .Sort Key1:=Range("g3"), Order1:=xlDescending, Header:=xlNo, _ OrderCustom:=1, MatchCase:=False,Orientation:=xlTopToBottom -- Gordon Rainsford London UK |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Avoid #div/0! | Excel Worksheet Functions | |||
IF isna to avoid #N/A | Excel Discussion (Misc queries) | |||
How to avoid #DIV/0 from appearing | Excel Discussion (Misc queries) | |||
what is this, how do I avoid it? | Excel Discussion (Misc queries) | |||
avoid div by zero | Excel Programming |