Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 527
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I need to modify my macro ... Dr. Darrell Excel Discussion (Misc queries) 0 February 24th 10 07:21 PM
Can we modify any of the ribbon tabs or create new ribbon tabs? Scott Sornberger New Users to Excel 2 March 19th 08 11:41 AM
Formula needs to include several worksheet tabs in one workbook klafert Excel Discussion (Misc queries) 12 July 2nd 07 02:16 PM
Modify a Macro Carl Excel Worksheet Functions 1 October 28th 06 10:32 AM
Modify A Formula To Include AND carl Excel Worksheet Functions 2 August 21st 05 03:41 PM


All times are GMT +1. The time now is 03:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"