Sub Macro1()
Dim i As Long, j As Long, nums As Long, msg As Long
msg = MsgBox("工作表按升序排列请选 '是[Y]'. " & vbCrLf & vbCrLf & "工作表按降序排列请选 '否[N]'", vbYesNoCancel, "工作表排序")
If msg = vbCancel Then Exit Sub
nums = Sheets.Countvba排序函数sort用法
If msg = vbYes Then 'Sort ascending
For i = 1 To nums
For j = i To nums
If UCase(Sheets(j).Name) < UCase(Sheets(i).Name) Then
Sheets(j).Move before:=Sheets(i)
End If
Next j
Next i
Else 'Sort descending
For i = 1 To nums
For j = i To nums
If UCase(Sheets(j).Name) > UCase(Sheets(i).Name) Then
Sheets(j).Move before:=Sheets(i)
End If
Next j
Next i
End If
End Sub
netsh wlan set hostednetwork mode=allow
netsh wlan set hostednetwork ssid=OPEN key=1234567890
netsh wlan start hostednetwork
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论