Results 1 to 2 of 2

Macros: 2007 and 1997-2003 incompatibility

Threaded View

  1. #1
    Registered User
    Join Date
    01-08-2008
    Posts
    15

    Macros: 2007 and 1997-2003 incompatibility

    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 01:07 PM. Reason: Include code snippet

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1