Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The following code selects contiguous worksheets 5 through 11.
============ Sub SelectSheets() Dim Sh() As Variant, wks As Worksheet, i As Integer i = 0 For Each wks In ActiveWorkbook.Sheets If wks.Range("E2") = 1 Then i = i + 1 ReDim Preserve Sh(1 To i) Sh(i) = wks.Name End If Next Worksheets(Sh()).Select End Sub =============== I would like to add one noncontiguous worksheet (#32) to the array of selected worksheets. Is there a way to do so? Barney Byrd |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I write an array to include all worksheets in a workbook? | Excel Worksheet Functions | |||
how do I include multiple worksheets to a countif formula? | Excel Discussion (Misc queries) | |||
include criteria to 'rank based array function' | Excel Discussion (Misc queries) | |||
How to Include exl charts from closed worksheets into PPT slides | Excel Programming | |||
Is it possible to include Excel worksheets/workbooks into COM Addins ? | Excel Programming |