Sub wsp_Sort_Sheets()
Dim sCount As Integer, i As Integer, r As Integer
ReDim Na(0) As String
sCount = Sheets.Count
For i = 1 To sCount
ReDim Preserve Na(i) As String
Na(i) = Sheets(i).Name
Next
For i = 1 To sCount - 1
For r = i + 1 To sCount
If Na(r) < Na(i) Then
JH = Na(i)
Na(i) = Na(r)
Na(r) = JH
End If
Next
Next
For i = 1 To sCount
Sheets(Na(i)).Move After:=Sheets(i)
Next
End Sub
excel sheet表排序
最新推荐文章于 2022-02-08 23:32:25 发布