sassriverrat
Well-known Member
- Joined
- Oct 4, 2018
- Messages
- 655
This line of code used to work. Now this, among a few others, doesn't seem to work. It kicks up a 438 "Object doesn't support this property or method" code and highlights the top line.... ideas? I can sort if I manually highlight and click sort....
Code:
Range("B3:K102").Select
ActiveWorkbook.Worksheets("Ports").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Ports").Sort.SortFields.Add2 Key:=Range("B3:B102") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Ports").Sort
.SetRange Range("B3:K102")
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With