This Code works
With ActiveWorkbook.Worksheets("Attendance").Sort
.SetRange Range("A3:J40")
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
and Code this doesn't work
Dim SHEET as Worksheet
Set SHEET = Sheets("NAME")
SHEET.Activate
Rng = "3:40"
With SHEET.Sort
.SetRange Range(Rng)
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply <--- fails on this line
End With
So what am I missing here? Thanks for any help you can give me.
Mac
Bookmarks