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
Last edited by lemonstar; 02-21-2009 at 12:07 PM. Reason: Include code snippet
Your post does not comply with Rule 5 of our Forum RULES. We have Seven question forums: Miscellaneous, General, Programming, Worksheet Functions, Charting, Excel 2007 Help and New Users. Please choose the appropriate forum, and post your question in ONLY one forum.
Move to programming.
is a xl 2007 command I believe. Best to make the macro's in xl 03 whenever possibleSortFields
VBA Noob
_________________________________________
![]()
![]()
Credo Elvem ipsum etian vivere
_________________________________________
A message for cross posters
Please remember to wrap code.
Forum Rules
Please add to your signature if you found this link helpful. Excel links !!!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks