9tanstaafl9
Well-known Member
- Joined
- Mar 23, 2008
- Messages
- 535
Hi all. I wrote a macro in Excel 98 that is being used in Excel 2000. I don't have a copy of that version to test/figure things out with.
The offending code that seems to be breaking everything is :
and
Does anyone know an easy way to make these work in Excel 2000? Better yet (but not strictly necessary), does anyone know how to make the code standardized so it will work for both versions so I don't have to maintain two copies?
Any related links for making code compatible for multiple versions of Excel would be appreciated too, I can't seem to find any info on this as the search terms are too generic and I'm obviously not looking asking the right questions.
Thanks!
Jennifer
The offending code that seems to be breaking everything is :
Code:
Selection.Sort Key1:=Range("C14"), Order1:=xlAscending, Key2:=Range("B14" _
), Order2:=xlAscending, Header:=xlNo, OrderCustom:=1, MatchCase:=False _
, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2:= _
xlSortNormal
and
Code:
ActiveSheet.Protect Password:="ma$terbuilder", DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True
Does anyone know an easy way to make these work in Excel 2000? Better yet (but not strictly necessary), does anyone know how to make the code standardized so it will work for both versions so I don't have to maintain two copies?
Any related links for making code compatible for multiple versions of Excel would be appreciated too, I can't seem to find any info on this as the search terms are too generic and I'm obviously not looking asking the right questions.
Thanks!
Jennifer