Thread: Sort Problem
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Patrick Simonds Patrick Simonds is offline
external usenet poster
 
Posts: 258
Default Sort Problem

I want to sort all worksheets without selecting them. I was attempting to
alter some code I got from Norman Jones which allowed me to perform other
functions with out actually selecting the worksheet, but it only seems to
sort the active worksheet. What am I missing?



Dim SH As Worksheet

For Each SH In ActiveWorkbook.Worksheets

Range("A3:h1301").Select
Selection.Sort Key1:=Range("A4"), Order1:=xlAscending, Header:=xlGuess,
_
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal

Next SH