如何把vb正序代码改成倒序代码?
End SubSub 排序()
'
' 宏2 宏
'
Dim shthz As Worksheet
Set shthz = Worksheets("汇总")
Dim i As Integer, j As Integer, row As Integer
Dim col As Integer, colstr As String
col = shthz.Cells(1, 256).End(xlToLeft).Column
colstr = getChar(col)
If col > 82 Then
MsgBox "统计的天数超过了80天,请删除最右边的数据,再运行程序!"
Exit Sub
End If
row = shthz.Range("A65536").End(xlUp).row
ActiveWorkbook.Worksheets("汇总").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("汇总").Sort.SortFields.Add Key:=Range("C2:C2860"), _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("汇总").Sort
.SetRange Range("A1:" & colstr & row)
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
ActiveWindow.SmallScroll Down:=-6
End Sub