ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Grouping Sheets in VBA (https://www.excelbanter.com/excel-programming/287948-grouping-sheets-vba.html)

John Pierce

Grouping Sheets in VBA
 
When I record the action of grouping all the sheets I get the
following.
I would like a macro that I could use to quickly group all sheets in a
workbook that will work with different numbers of sheets. No special
conditions to look for and no particular operations to perform.

Sheets(Array"Sheet1", "Sheet2", "Sheet3", "Sheet4", "Sheet5",
"Sheet6")).Select Replace:=False


All times are GMT +1. The time now is 10:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com