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

I have the following code that I'm trying to use to sort:

Sheets("OPEN").Select

Selection.Sort Key1:=Range("Y2"), Order1:=xlAscending, Key2:=Range("AE2") _
, Order2:=xlAscending, Key3:=Range("AB2"), Order3:=xlAscending,
Header _
:=xlGuess, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom _
, DataOption1:=xlSortNormal, DataOption2:=xlSortNormal,
DataOption3:= _
xlSortNormal





It errors out with the error:
'Runtime error "1004"
Application-defined or Object-defined error'
 
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
Writing a macro to sort and export data to multiple worksheets sdipietro Excel Programming 1 October 18th 07 07:59 PM
Macro Writing rjamison Excel Programming 0 June 14th 05 12:14 AM
help writing macro Alison Excel Programming 1 September 23rd 04 10:47 PM
Help writing a macro alldreams Excel Programming 0 June 4th 04 08:24 AM
Writing 2 macros to sort names and numbers in excel 97 Paul Excel Programming 1 November 2nd 03 10:58 PM


All times are GMT +1. The time now is 04:33 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"