Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Activate each sheet in workbook with exception of...
I am trying to activate each Sheet in the workbook one time, with the
exception of 3 Sheets? Call them Sheet2, Wk3, and DD4. Do you know how to do that? Sub NextSheet() If ActiveSheet.Index = Sheets.Count Then Sheets(1).Activate Else Sheets(ActiveSheet.Index + 1).Activate End If End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Activate each sheet in workbook with exception of...
Hi,
Try this Sub NextSheet() For x = 1 To Worksheets.Count S = "Sheet2,Wk3,DD4" V = Split(S, ",") If Not IsError(Application.Match((Sheets(x).Name), V, 0)) Then Sheets(x).Activate 'presumably do things End If Next End Sub Mike "Jazz" wrote: I am trying to activate each Sheet in the workbook one time, with the exception of 3 Sheets? Call them Sheet2, Wk3, and DD4. Do you know how to do that? Sub NextSheet() If ActiveSheet.Index = Sheets.Count Then Sheets(1).Activate Else Sheets(ActiveSheet.Index + 1).Activate End If End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Activate sheet in another workbook by its code name | Excel Programming | |||
WorkBook Open & Sheet Activate | Excel Programming | |||
Workbook.Activate / Window.Activate problem | Excel Programming | |||
how to open a Workbook and activate a specific sheet | Excel Programming | |||
how to open a Workbook and activate a specific sheet | Excel Programming |