Macros created in 2003 won't work in 2000

D

dford

I have created macros in 2003. They won't work in 2000. Is there a way to
save in an earlier version and make it work. I tried to save it in 97-2000
version and
it still does not work. Is there a way to solve this.
 
J

Jim Thomlinson

You need to develope the macros using the lowest common denominator version
(in your case 2000). As a guess your problem will reside in your sort
routines. There in a new argument in the Sort which you can just remove

DataOption1:=xlSortNormal <-Delete this...
 
D

dford

Jim,
The one problem is in the sort routine as you described. I think I know how
to delete that as you suggest. The other problem is with a print routine
using a macro. How do I correct that. When I fix these to work in 2000, will
they still work in 2003?
 
N

Nick Hodge

I've not got XL2000 so I've stripped this back as much as I can, but it
should still be fine.

Sub princolors()
'
' princolors Macro
' Macro recorded 5/19/2006 by Doug
Range("A1647:E1747").Select

Selection.AutoFilter
Selection.Sort Key1:=Range("B3"), Order1:=xlAscending, Header:=xlGuess
Selection.AutoFilter Field:=2, Criteria1:="<>"
Range("A1646").Select

Range("A1646:E1747").Select
Selection.PrintOut Copies:=1, Collate:=True

Range("A1646").Select
Selection.AutoFilter

'
End Sub


Sub sortcolorscode()
'
' sortcolorscode Macro
' Macro recorded 4/25/2006 by Doug
Selection.AutoFilter
Range("A1647:E1747").Sort Key1:=Range("A3"), Order1:=xlAscending,
Header:=xlGuess
Selection.AutoFilter
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
[email protected]
www.nickhodge.co.uk
 
Top