Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 125
Default outline with protection

Hi

I'm not up with these macro's, but do used some off this forum with plenty of
help !

I have spreadsheet with 12 sheets all protected and all with outlines
(grouping) already formated

I am trying to use this macro from Dave Paterson's tread. I have amended the
password and have paste it in "This Workbook"

What I am trying to do, is when the workbook is opened by the operator, they
will be permitted to use the grouping already set up, but still have the
sheet protected. I do have more than one sheet, therefroe will i need to
amend "sheet1" on the first line?

Help appriciated

Option Explicit
Sub auto_open()
With Worksheets("sheet1")
.Protect Password:="template", userinterfaceonly:=True
.EnableOutlining = True
.EnableAutoFilter = True
End With
End Sub

Using XL 2003

Regards

Brian

--
Message posted via http://www.officekb.com

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,316
Default outline with protection

See if the following does the trick, but save your real file under a new name
before running as this has not been tested:

Sub auto_open()

Dim wb as Workbook
Dim ws as Worksheet

Set wb = ThisWorkbook

For each ws in wb.Worksheets
With ws
.Protect Password:="template", userinterfaceonly:=True
.EnableOutlining = True
.EnableAutoFilter = True
End With
Next ws

Set wb = Nothing
End Sub


--
Kevin Backmann


"BNT1 via OfficeKB.com" wrote:

Hi

I'm not up with these macro's, but do used some off this forum with plenty of
help !

I have spreadsheet with 12 sheets all protected and all with outlines
(grouping) already formated

I am trying to use this macro from Dave Paterson's tread. I have amended the
password and have paste it in "This Workbook"

What I am trying to do, is when the workbook is opened by the operator, they
will be permitted to use the grouping already set up, but still have the
sheet protected. I do have more than one sheet, therefroe will i need to
amend "sheet1" on the first line?

Help appriciated

Option Explicit
Sub auto_open()
With Worksheets("sheet1")
.Protect Password:="template", userinterfaceonly:=True
.EnableOutlining = True
.EnableAutoFilter = True
End With
End Sub

Using XL 2003

Regards

Brian

--
Message posted via http://www.officekb.com


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 125
Default outline with protection

Thanks Kevin for the response

Copied into "this workbook". Saved, and the opened, but did not work.

Any ideas?

regards

Kevin B wrote:
See if the following does the trick, but save your real file under a new name
before running as this has not been tested:

Sub auto_open()

Dim wb as Workbook
Dim ws as Worksheet

Set wb = ThisWorkbook

For each ws in wb.Worksheets
With ws
.Protect Password:="template", userinterfaceonly:=True
.EnableOutlining = True
.EnableAutoFilter = True
End With
Next ws

Set wb = Nothing
End Sub

Hi

[quoted text clipped - 28 lines]

Brian


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200809/1

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 125
Default outline with protection

Sorry Kevin

This works perfect, I have placed it in a module (if thats the jargon) and it
worked on all sheets

Thanks for your help

Brian

BNT1 wrote:
Thanks Kevin for the response

Copied into "this workbook". Saved, and the opened, but did not work.

Any ideas?

regards

See if the following does the trick, but save your real file under a new name
before running as this has not been tested:

[quoted text clipped - 22 lines]

Brian


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200809/1

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default outline with protection

Auto_open goes in a general module

Workbook_open would go in Thisworkbook


Gord Dibben MS Excel MVP

On Thu, 18 Sep 2008 19:32:07 GMT, "BNT1 via OfficeKB.com" <u19326@uwe
wrote:

Thanks Kevin for the response

Copied into "this workbook". Saved, and the opened, but did not work.

Any ideas?

regards

Kevin B wrote:
See if the following does the trick, but save your real file under a new name
before running as this has not been tested:

Sub auto_open()

Dim wb as Workbook
Dim ws as Worksheet

Set wb = ThisWorkbook

For each ws in wb.Worksheets
With ws
.Protect Password:="template", userinterfaceonly:=True
.EnableOutlining = True
.EnableAutoFilter = True
End With
Next ws

Set wb = Nothing
End Sub

Hi

[quoted text clipped - 28 lines]

Brian


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
Sheet protection and "Group and Outline" OkieViking Excel Discussion (Misc queries) 9 May 22nd 07 05:17 PM
please help . access group and outline with protection on darren Excel Discussion (Misc queries) 1 March 4th 06 02:59 PM
view group and outline with protection on derwood Excel Discussion (Misc queries) 1 February 27th 06 02:01 AM
How do I remove the outline protection in Excel sheet? Rick Excel Discussion (Misc queries) 1 October 6th 05 07:43 PM
Protection with Outline jmenche Excel Discussion (Misc queries) 2 August 16th 05 01:09 PM


All times are GMT +1. The time now is 01:28 AM.

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"