![]() |
modify macro to include more tabs
Hi,
The macro below allows users to group/ungroup rows in a protected sheet. How do I modify this macro to either incorporate more worksheets or apply it to the entire workbook? Thanks, Charlie Sub workbook_open() With Worksheets("Sheet1") .Protect Password:="password", userinterfaceonly:=True .EnableOutlining = True End With End Sub |
modify macro to include more tabs
Try something like this, not tested
Sub workbook_open() Dim wks as worksheet For each wks in Activeworkbook With wks) .Protect Password:="password", userinterfaceonly:=True .EnableOutlining = True End With next wks End Sub HTH Peter "teh_chucksta" wrote: Hi, The macro below allows users to group/ungroup rows in a protected sheet. How do I modify this macro to either incorporate more worksheets or apply it to the entire workbook? Thanks, Charlie Sub workbook_open() With Worksheets("Sheet1") .Protect Password:="password", userinterfaceonly:=True .EnableOutlining = True End With End Sub |
All times are GMT +1. The time now is 01:27 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com