请高手帮忙看看,2003中为什么不能执行以下的宏,因为要进行4个关键词的排序,怎么办才好?
Range("G35:L50").SelectActiveWorkbook.Worksheets("成绩総合").Sort.SortFields.ClearActiveW...
Range("G35:L50").Select
ActiveWorkbook.Worksheets("成绩総合").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("成绩総合").Sort.SortFields.Add Key:=Range("i36:i50") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
ActiveWorkbook.Worksheets("成绩総合").Sort.SortFields.Add Key:=Range("j36:j50") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
ActiveWorkbook.Worksheets("成绩総合").Sort.SortFields.Add Key:=Range("k36:k50") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Add Key:=Range("l36:l50") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("成绩総合").Sort
.SetRange Range("G35:L50")
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub 展开
ActiveWorkbook.Worksheets("成绩総合").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("成绩総合").Sort.SortFields.Add Key:=Range("i36:i50") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
ActiveWorkbook.Worksheets("成绩総合").Sort.SortFields.Add Key:=Range("j36:j50") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
ActiveWorkbook.Worksheets("成绩総合").Sort.SortFields.Add Key:=Range("k36:k50") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Add Key:=Range("l36:l50") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("成绩総合").Sort
.SetRange Range("G35:L50")
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询