Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
For educational purposes,I'm am trying to create a macro
to use in an add-in that will select all of the sheets in a workbook via use of an array. This macro will work in the current workbook but does not seem to work when applied to other workbooks. Would anyone have advice on how this macro could be modified so that it could be placed in the add-in and works when applied to other workbooks? Sub TestSelect() Dim Sht() As String Dim Cnt As Long ReDim Sht(1 To ThisWorkbook.Sheets.Count) For Cnt = LBound(Sht) To UBound(Sht) ThisWorkbook.Sheets.Select Next Cnt End Sub Thanks for your help. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to select all sheets | Excel Discussion (Misc queries) | |||
macro to select all sheets | Excel Discussion (Misc queries) | |||
Macro to select and print sheets | Excel Discussion (Misc queries) | |||
sheets(array).select problem | Excel Discussion (Misc queries) | |||
Select sheets from an array for printing | Excel Discussion (Misc queries) |