View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default group all sheets after

This will work if the current selected sheet(s) is/are to the left of that
Apples/3 sheet.

Gary Keramidas wrote:

here's another way, there're always multiple ways to do things.

Option Explicit

Sub test()
Dim i As Long
Application.ScreenUpdating = False
For i = Worksheets("Apples").Index To Worksheets.Count
Worksheets(i).Select False
Next
Application.ScreenUpdating = True
End Sub

Sub test2()
Dim i As Long
Application.ScreenUpdating = False
For i = 3 To Worksheets.Count
Worksheets(i).Select False
Next
Application.ScreenUpdating = True
End Sub

--

Gary Keramidas
Excel 2003

"J.W. Aldridge" wrote in message
...
Need to know how to express the following....


group all sheets in a workbook after sheet "apples"
or
group all sheets in a workbook after the 3rd sheet in workbook.


--

Dave Peterson