Hi,
Thanks for both the replys - have it sorted
Thanks again
Hi,
Thanks for both the replys - have it sorted
Thanks again
These are great solutions
Worked for me too!!
Thanks![]()
Using Excel 2007.
Amit Cohen
A variation:
![]()
Sub demo() SortSheets Sheets("Start").Index + 1, Sheets("Spacer").Index - 1 End Sub Public Sub SortSheets(Optional iBeg As Long = 1, _ Optional iEnd As Long = 32767, _ Optional wkb As Workbook) Dim i As Long Dim j As Long If wkb Is Nothing Then Set wkb = ActiveWorkbook With wkb If i < 1 Then i = 1 If j > .Sheets.Count Then j = .Sheets.Count For i = iBeg + 1 To iEnd For j = iBeg To i - 1 If .Sheets(i).Name < .Sheets(j).Name Then .Sheets(i).Move Before:=.Sheets(j) Exit For End If Next j Next i End With End Sub
Last edited by shg; 09-01-2009 at 10:48 AM.
Entia non sunt multiplicanda sine necessitate
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks