Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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, |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
automatic sheet selection | Excel Discussion (Misc queries) | |||
Selection from list on main sheet from suplemental sheet in same w | New Users to Excel | |||
search in a sheet and selection? | Excel Discussion (Misc queries) | |||
Excel VBA : Sheet selection | Excel Programming | |||
Copy Selection to new sheet | Excel Programming |