Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Problem with Sort Method After Paste

Can anyone find out what is wrong with this code? I can't figure out why I
get error 1004 Sort Method of Range Class Failed when I click the custom
command button.

Sub Sort()
Range("B73:D85").Select
Selection.Copy
ActiveWindow.SmallScroll Down:=17
Range("B91:D103").Select
ActiveSheet.Paste Link:=True
Application.CutCopyMode = False
Range("B91:D103").Select
Selection.Sort Key1:=Range("B91"), Order1:=xlDescending, Header:=xlGuess _
, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Problem with Sort Method After Paste

code ran fine for me.

after the code errors, can you go to Data=Sort and sort the selection
manually?

--
Regards,
Tom Ogilvy


"AmytDev" wrote:

Can anyone find out what is wrong with this code? I can't figure out why I
get error 1004 Sort Method of Range Class Failed when I click the custom
command button.

Sub Sort()
Range("B73:D85").Select
Selection.Copy
ActiveWindow.SmallScroll Down:=17
Range("B91:D103").Select
ActiveSheet.Paste Link:=True
Application.CutCopyMode = False
Range("B91:D103").Select
Selection.Sort Key1:=Range("B91"), Order1:=xlDescending, Header:=xlGuess _
, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End Sub

Reply
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
can you change the default paste method? (paste values) David A Brown Excel Discussion (Misc queries) 3 December 18th 07 09:59 AM
Paste Method failed (Activesheet.Paste) MS Excel Excel Programming 2 October 13th 05 02:22 PM
Help with Sort Method turnerje[_7_] Excel Programming 1 October 6th 05 09:21 PM
Cut and Paste using Macro gives paste special method error Lourens Pentz Excel Programming 3 November 21st 04 10:42 PM
Sort Method Squid[_3_] Excel Programming 3 March 2nd 04 02:25 PM


All times are GMT +1. The time now is 09:36 AM.

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

About Us

"It's about Microsoft Excel"