Private Sub CommandButton5_Click()
With ThisWorkbook
On Error Resume Next
Set MyCell = Application.InputBox(prompt:="请选择需要排序的列(点击标题栏)", Type:=8)
If MyCell = "" Then Exit Sub
W = MyCell.Column
Range("A3").Resize(Range("A65536").End(3).Row() - 2, 256).Sort key1:=Cells(2, W), Order1:=xlAscending, Header:=xlGuess
End With
End Sub
求助修改为给数据排名的代码,怎么样修改