Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hello Patrick, The code as it is written is defaulting to the ActiveSheet (Range("A3:h1301").Select). Notice the words Select and Selection in the code are not qualified with a worksheet name. Without the qualifier, the system defaults to the ActiveSheet. Here is the amended code. _____________________ Dim SH As Worksheet For Each SH In ActiveWorkbook.Worksheets SH.Range("A3:h1301").Sort Key1:=Range("A4"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal Next SH _____________________ Sincerely, Leith Ross -- Leith Ross ------------------------------------------------------------------------ Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465 View this thread: http://www.excelforum.com/showthread...hreadid=488326 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
A "sort" problem | Excel Discussion (Misc queries) | |||
Sort Problem | Excel Worksheet Functions | |||
sort problem with first row | Excel Programming | |||
Sort Problem | Excel Programming | |||
Sort Problem | Excel Discussion (Misc queries) |