Excelのシートを並び替えるマクロ

Sub SortSheets()

 Dim intLoopA As Integer
 Dim intLoopB As Integer

 For intLoopA = 1 To Sheets.Count
  For intLoopB = 1 To Sheets.Count - 1
   If Sheets(intLoopB).Name > Sheets(intLoopB + 1).Name Then
    Sheets(intLoopB).Move after:=Sheets(intLoopB + 1)
   End If
  Next intLoopB
 Next intLoopA

End Sub
twitterfacebookhatenafacebook