View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
royUK[_20_] royUK[_20_] is offline
external usenet poster
 
Posts: 1
Default How to arrange worksheets in alphabetical order?


This code might help,it's speed will depend on the number of sheets


Code:
--------------------

Sub SortSheets()
Dim I As Integer, J As Integer

For I = 1 To Sheets.Count - 1
For J = I + 1 To Sheets.Count
If UCase(Sheets(I).Name) UCase(Sheets(J).Name) Then
Sheets(J).Move Befo=Sheets(I)
End If
Next J
Next I
End Sub

--------------------


--
royUK

Hope that helps, RoyUK
For tips & examples visit my 'web site' (http://www.excel-it.com/)
------------------------------------------------------------------------
royUK's Profile: http://www.thecodecage.com/forumz/member.php?userid=15
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=115087