Carol
This worked for me. If you still get a subscript out of range error, then
post the code as you have it and list the sheets in the order they appear in
your workbook.
Sub GroupSheets()
Dim sh As Object
Dim shArr() As String
Dim FirstSheet As Object
Dim LastSheet As Object
Set FirstSheet = Sheets("Sheet2")
Set LastSheet = Sheets("Sheet4")
If FirstSheet.Index LastSheet.Index - 2 Then
MsgBox "First sheet must be less than Last sheet"
Exit Sub
End If
ReDim shArr((FirstSheet.Index + 1) To (LastSheet.Index - 1))
For Each sh In ThisWorkbook.Sheets
If sh.Index FirstSheet.Index And sh.Index < LastSheet.Index Then
shArr(sh.Index) = sh.Name
End If
Next sh
Sheets(shArr).Select
End Sub
--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com
"Carol" wrote in message
...
ALso I might add this should be non inclusive of sheet2 and sheet3...Index
sheet2 +1 Index sheet3 -1 Ors omething like that
Thanks again!