I've just found that the macros I recorded in 2007 for a simple data sort, i.e. highlight some cells and data sort, do not run when the spreadsheet is opened in Excel 1997-2003 after the original had been saved in the old format.There was a warning about slight loss of quality due to formatting but nothing else. Is there a simple way around this or do I have to rerecord all the macros in the old version?
Macros code for the sort is typically this:-
Sub Macro2()
'
' Macro2 Macro
'
'
Range("M13:N18").Select
ActiveWorkbook.Worksheets("FM I-O (B)").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("FM I-O (B)").Sort.SortFields.Add Key:=Range( _
"M13:M18"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("FM I-O (B)").Sort
.SetRange Range("M13:N18")
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub
Bookmarks