View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Matt. Matt. is offline
external usenet poster
 
Posts: 43
Default Excel 2000 VBA Sort without Select

Hi all!

If it is possible, can somebody give me the syntax for sorting a worksheet
without selecting it?

The worksheet has a header row (row 1). I would like to sort all the values
in the worksheet by column A Ascending. Column A is a Date. There will
never be more than 50 rows and 10 columns.

This is the code I'm using.

Sheets("Accum").CurrentRegion.Sort Key1:=Range("A2"),
Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

The error I'm getting is the method or object isn't supported.

Any help greatly appreciated. Thanks in advance.

cheers,
Matt.