Changing M2 to M1 might work.
One technique I have used to work with Excel worksheets from Access VBA is to in Excel record a macro while you do what you need to do (in this case a sort), then take the resulting code and copy it into Access. It usually requires some modification, but not a great deal.
For example, when I recorded a macro while sorting an Excel worksheet on a column, and answered yes at the prompt to expand the selection, the macro looked like this:
Code:
Sub Macro3()
'
' Macro3 Macro
'
'
Columns("B:B").Select
ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Add Key:=Range("B1"), _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Sheet1").Sort
.SetRange Range("A1:O25")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub
The changes required to use it in access would be in referring to the worksheet.