Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have written a macro ing Excel 2007, but when we try to run it using 2003
it falls over. This is the first line of code it stops at. We are trying to sort on Row 1. ActiveWorkbook.Worksheets("SAP ZAUMAT - WORKING").Sort.SortFields.Clear ActiveWorkbook.Worksheets("SAP ZAUMAT - WORKING").Sort.SortFields.AddKey:=_ Range("A1:AM1"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=_xlSortNormal (Sorry about the way it looks here) How does this translate to 2003? Should it be different? Thanks Rick |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I just recorded a sort with a header and this is what I got
Selection.Sort Key1:=Range("A3"), Order1:=xlAscending, Header:=xlYes, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal -- HTH, Barb Reinhardt "Rick" wrote: I have written a macro ing Excel 2007, but when we try to run it using 2003 it falls over. This is the first line of code it stops at. We are trying to sort on Row 1. ActiveWorkbook.Worksheets("SAP ZAUMAT - WORKING").Sort.SortFields.Clear ActiveWorkbook.Worksheets("SAP ZAUMAT - WORKING").Sort.SortFields.AddKey:=_ Range("A1:AM1"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=_xlSortNormal (Sorry about the way it looks here) How does this translate to 2003? Should it be different? Thanks Rick |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Just to add to Barb's response.
Lots of things got added in xl2007. You may find it much easier to develop in xl2003 (or whatever the oldest version of excel you have to support), then test to see if it still works in xl2007 (or all the newer versions). (All that .sort.sortfields stuff was added in xl2007.) Rick wrote: I have written a macro ing Excel 2007, but when we try to run it using 2003 it falls over. This is the first line of code it stops at. We are trying to sort on Row 1. ActiveWorkbook.Worksheets("SAP ZAUMAT - WORKING").Sort.SortFields.Clear ActiveWorkbook.Worksheets("SAP ZAUMAT - WORKING").Sort.SortFields.AddKey:=_ Range("A1:AM1"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=_xlSortNormal (Sorry about the way it looks here) How does this translate to 2003? Should it be different? Thanks Rick -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can develop in 2003, but there is no guarantee that it will all work in
2007. I have a workbook that will need to be used by users in 2003 OR 2007 so I'm having some fun! NOT! -- HTH, Barb Reinhardt "Dave Peterson" wrote: Just to add to Barb's response. Lots of things got added in xl2007. You may find it much easier to develop in xl2003 (or whatever the oldest version of excel you have to support), then test to see if it still works in xl2007 (or all the newer versions). (All that .sort.sortfields stuff was added in xl2007.) Rick wrote: I have written a macro ing Excel 2007, but when we try to run it using 2003 it falls over. This is the first line of code it stops at. We are trying to sort on Row 1. ActiveWorkbook.Worksheets("SAP ZAUMAT - WORKING").Sort.SortFields.Clear ActiveWorkbook.Worksheets("SAP ZAUMAT - WORKING").Sort.SortFields.AddKey:=_ Range("A1:AM1"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=_xlSortNormal (Sorry about the way it looks here) How does this translate to 2003? Should it be different? Thanks Rick -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You're right.
That's why I included that "then test to see if it still works..." phrase. But I bet testing, er, fixing, is easier when developed in xl2003 and modified for xl2007--rather than vice-versa. Barb Reinhardt wrote: You can develop in 2003, but there is no guarantee that it will all work in 2007. I have a workbook that will need to be used by users in 2003 OR 2007 so I'm having some fun! NOT! -- HTH, Barb Reinhardt "Dave Peterson" wrote: Just to add to Barb's response. Lots of things got added in xl2007. You may find it much easier to develop in xl2003 (or whatever the oldest version of excel you have to support), then test to see if it still works in xl2007 (or all the newer versions). (All that .sort.sortfields stuff was added in xl2007.) Rick wrote: I have written a macro ing Excel 2007, but when we try to run it using 2003 it falls over. This is the first line of code it stops at. We are trying to sort on Row 1. ActiveWorkbook.Worksheets("SAP ZAUMAT - WORKING").Sort.SortFields.Clear ActiveWorkbook.Worksheets("SAP ZAUMAT - WORKING").Sort.SortFields.AddKey:=_ Range("A1:AM1"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=_xlSortNormal (Sorry about the way it looks here) How does this translate to 2003? Should it be different? Thanks Rick -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excell 2007 / 2003 Compatability Issue | Excel Worksheet Functions | |||
Compatability Issues between 2007 and 2003 | Excel Discussion (Misc queries) | |||
2007 Compatability Pack for Office 2003 | Excel Discussion (Misc queries) | |||
Office 2003 and 2007 compatability install | Excel Discussion (Misc queries) | |||
Excel compatability 2003-2007 | Setting up and Configuration of Excel |