Thread: Sheet selection
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Sheet selection

Sub Tester1()
Const shName As String = "Sheet1"
Dim sh As Worksheet, i As Long, j As Long
i = 1
j = 0
For Each sh In ThisWorkbook.Worksheets
j = j + 1
If LCase(sh.Name) < LCase(shName) Then
sh.Select sh.Name = Worksheets(i).Name
ElseIf j = 1 Then
i = j + 1
End If
Next


End Sub

--
Regards,
Tom Ogilvy


wrote in message
...
Hello,

Using VBA for Excel
How could I go about selecting all of the sheets in a
workbook except for 1 particular sheet. I would like to do
this without having to state the name of each individual
sheet, except for the 1 particular sheet.

Thank You,