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: 355
Default Sort Runtime Erroe 1004

I have a simple sort which I have used many times. I recorded it with the
macro recorder and it works fine but when in the code it gets a
'Runtime error 1004'. The sort reference is not valid. Make sure that it's
within the data you want to sort and, the first Sort By box isn't the same
or blank.

Here is the code.

Sheets("Report Log").Select
Sheets("Report Log").Range("A1").Select
Selection.CurrentRegion.Select
Selection.Sort Key1:=Range("N2"), Order1:=xlAscending, Key2:=Range("A2") _
, Order2:=xlAscending, Key3:=Range("B2"),
Order3:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom

Thanmk you

 
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
Runtime 1004 Len B Excel Programming 2 February 21st 07 01:28 AM
1004 runtime error Waldyd Excel Programming 1 July 18th 06 06:54 PM
Runtime Error 1004 smcq Excel Programming 2 March 22nd 06 09:56 AM
Runtime 1004 Sort method of range crt Excel Programming 1 September 8th 05 07:48 PM
Runtime error 1004 Daniel Excel Programming 2 July 19th 05 04:37 AM


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