View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Colo Colo is offline
external usenet poster
 
Posts: 62
Default Worksheets in alphabetical order

Hi Mark,

Here is a simple code I wrote. Please try this.

Sub WorksheetSort()
Dim intC1 As Long, intC2 As Integer
For intC1 = 1 To Sheets.Count
For intC2 = 1 To Sheets.Count - 1
If Sheets(intC2).Name Sheets(intC2 + 1).Name Then
Sheets(intC2).Move after:=Sheets(intC2 + 1)
End If
Next intC2, intC1
End Sub


--
Kind Regards
Colo
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Colo of 'The Road of The Cell Masters' :)

URL:http://www.interq.or.jp/sun/puremis/...astersLink.htm


/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/


"Mark" wrote in message
...
I am using Excel 97.

I want to sort worksheets in a workbook so that they are
in alphabetical order.

Can anyone asist me with some code?

Thanks


Mark