Hi All You Gurus...
I have this code that worked fine when it was in a module.
I have now placed the code into a command button which is now in the sheet code.
It now fails at the .Apply stage
Any ideas....![]()
Cells.Select ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Clear ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Add Key:=Range("F:F") _ , SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal With ActiveWorkbook.Worksheets("Sheet1").Sort .SetRange Range("A:AF") .Header = xlYes .MatchCase = False .Orientation = xlTopToBottom .SortMethod = xlPinYin .Apply End With











LinkBack URL
About LinkBacks
Register To Reply
Bookmarks