Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() to check this i added dim target as range set target = selecttion and in your code replaced Selection by target so the line that starts Selection.Sort became target.Sort my demo file worked for both versions of Excel. in my demo, the selected cell was the row label 'Month' "abajo" wrote in message ... Any Idea why the following macro code returns this error: "Run-time error '1004': Sort Method of Range Class failed". The code works fine in Office Excel 2003. ActiveSheet.PivotTables(pivName).PivotSelect "month[All]", xlLabelOnly Selection.Sort Order1:=xlAscending, Type:=xlSortLabels, OrderCustom:=csort, Orientation:=xlTopToBottom Thanks, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
F2 Key not working in Excel 2007 | Excel Discussion (Misc queries) | |||
Code in 2003 not working in 2007 | Excel Programming | |||
2007 code not working in 2003 | Excel Programming | |||
Excel 2007 Macro Help (Excel 2003 not working in 2007) | Excel Discussion (Misc queries) | |||
Code not working since upgrade to 2007 | Excel Programming |