LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sort Problem


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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
A "sort" problem comotoman Excel Discussion (Misc queries) 1 September 28th 05 10:48 PM
Sort Problem andyp161 Excel Worksheet Functions 1 September 5th 05 12:19 PM
sort problem with first row [email protected] Excel Programming 1 July 15th 05 03:03 PM
Sort Problem [email protected] Excel Programming 6 May 13th 05 06:33 PM
Sort Problem jdb Excel Discussion (Misc queries) 1 January 10th 05 11:05 PM


All times are GMT +1. The time now is 05:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"