Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
The macro below allows users to group/ungroup rows in a protected sheet. Question: how to modify the VB code so I can incorporate additional tab names or better yet, have the macro apply to the entire workbook? Thanks in advance for your help, Charlie Sub workbook_open() With Worksheets("Sheet1") .Protect Password:="xlhelp", userinterfaceonly:=True .EnableOutlining = True End With End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Sub workbook_open() For Each sh In Activeworkbook.Worksheets With sh .Protect Password:="xlhelp", userinterfaceonly:=True .EnableOutlining = True End With Next sh End Sub -- HTH Bob "teh_chucksta" wrote in message ... Hi, The macro below allows users to group/ungroup rows in a protected sheet. Question: how to modify the VB code so I can incorporate additional tab names or better yet, have the macro apply to the entire workbook? Thanks in advance for your help, Charlie Sub workbook_open() With Worksheets("Sheet1") .Protect Password:="xlhelp", userinterfaceonly:=True .EnableOutlining = True End With End Sub |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Try this: Sub workbook_open() for each sh in thisworkbook.sheets if sh.name<"NotThisSheet" then With sh .Protect Password:="xlhelp", userinterfaceonly:=True .EnableOutlining = True End With end if next End Sub Regards, Per "teh_chucksta" skrev i meddelelsen ... Hi, The macro below allows users to group/ungroup rows in a protected sheet. Question: how to modify the VB code so I can incorporate additional tab names or better yet, have the macro apply to the entire workbook? Thanks in advance for your help, Charlie Sub workbook_open() With Worksheets("Sheet1") .Protect Password:="xlhelp", userinterfaceonly:=True .EnableOutlining = True End With End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do you apply a print area to an entire workbook | Excel Discussion (Misc queries) | |||
How to apply page number continous for entire workbook | Excel Discussion (Misc queries) | |||
How to apply macros to entire workbook | Excel Discussion (Misc queries) | |||
How to apply a format to an entire workbook | Excel Worksheet Functions | |||
How to apply a format to an entire workbook | Excel Worksheet Functions |