Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Error Message: Sort Method of Range Class Failed

I want my marco button to sort my POLICYLIST named range by A5, then by P5,
but it's not working. What am I doing wrong?

Application.Goto Reference:="POLICYLIST"
Selection.Sort Key1:=Range("A5"), Order1:=xlAscending, Key2:=Range("P5") _
, Order2:=xlAscending, Header:=xlNo, OrderCustom:=1,
MatchCase:=False, _
Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2:= _
xlSortNormal
Range("B5").Select
End Sub


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Error Message: Sort Method of Range Class Failed

I feel so silly - disregard my question - I figured it out. My worksheet is
protected & I forgot to tell my macro to unprotect my worksheet first.

"Munchkin" wrote:

I want my marco button to sort my POLICYLIST named range by A5, then by P5,
but it's not working. What am I doing wrong?

Application.Goto Reference:="POLICYLIST"
Selection.Sort Key1:=Range("A5"), Order1:=xlAscending, Key2:=Range("P5") _
, Order2:=xlAscending, Header:=xlNo, OrderCustom:=1,
MatchCase:=False, _
Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2:= _
xlSortNormal
Range("B5").Select
End Sub


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default Error Message: Sort Method of Range Class Failed

Something definitely doesn't seem right. Is A5 and P5 inside the POLICYLIST?
Ryan--

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Munchkin" wrote:

I want my marco button to sort my POLICYLIST named range by A5, then by P5,
but it's not working. What am I doing wrong?

Application.Goto Reference:="POLICYLIST"
Selection.Sort Key1:=Range("A5"), Order1:=xlAscending, Key2:=Range("P5") _
, Order2:=xlAscending, Header:=xlNo, OrderCustom:=1,
MatchCase:=False, _
Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2:= _
xlSortNormal
Range("B5").Select
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
Select method of Range class failed error message Ayo Excel Programming 1 May 1st 09 12:14 PM
Select method of Range class failed error message Jacob Skaria Excel Programming 0 May 1st 09 07:04 AM
Select method of Range class failed error message Jacob Skaria Excel Programming 0 May 1st 09 07:01 AM
sort method of range class failed Jim Cone Excel Programming 0 December 2nd 06 12:04 AM
Error Message Copy method of worksheet class failed Philip4946 Excel Programming 7 September 14th 06 08:26 PM


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